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 large wavelength step size.
insert_hinges(x, y, h)
numeric vector (sorted in increasing order)
a numeric vector giving the wavelengths at which the y values should be inserted by interpolation, no interpolation is indicated by an empty vector (numeric(0))
a data.frame with variables
y. Unless the hinge
values were already present in
y, each inserted hinge, expands the
vectors returned in the data frame by one value.
Insertion is a costly operation but I have tried to optimize this function as much as possible by avoiding loops. Earlier this function was implemented in C++, but a bug was discovered and I have now rewritten it using R.
Other low-level functions operating on numeric vectors.:
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.