Skip to contents

Inserting wavelengths values immediately before and after a discontinuity in the SWF, greatly reduces the errors caused by interpolating the weighted irradiance during integration of the effective spectral irradiance. This is specially true when data have a relatively large wavelength step size and/or when the weighting function used has discontinuities in its value or slope. This function differs from insert_hinges() in that it returns a vector of y values instead of a tibble.

Usage

v_insert_hinges(x, y, h)

Arguments

x

numeric vector (sorted in increasing order).

y

numeric vector.

h

a numeric vector giving the wavelengths at which the y values should be inserted by interpolation, no interpolation is indicated by an empty numeric vector (numeric(0)).

Value

A numeric vector with the numeric values of y, but longer. Unless the hinge values were already present in y, each inserted hinge, expands the vector by two values.