Description Usage Arguments Details Value References See Also
This function deconvolves a measured signal into a sum of model functions.
1 2 3 4 5 6 7 8 9 10 11 |
spec |
A vector with the spectra to be deconvolved. |
sr |
A vector with the spectral reference of the spectra. |
start |
A matrix with first guess parameters. See details. |
lower |
A matrix with the lower limit of the parameters to be fitted. See details. |
upper |
A matrix with the upper limit of the parameters to be fitted. See details. |
ef |
Error function to be minimized. |
model |
One of 'Gauss', 'Lorentz' or 'Voigt'. See details. |
maxit |
Maximum number of iterations. |
reltol |
Relative tolerance for convergence criteria. |
This function is a wrapper for the optim
function, with the
Nelder-Mead method, for deconvolution of a spectrum as sum of Gaussian,
Lorentzian or Voigt curves. It is appropriate for deconvolution of absorption
peaks if the peaks are present in or just beyond the limits of the
measured spectrum. When applied for deconvolution of pigment absorption, it
is important that other absorption signals have been removed form the
spectrum for a meaningful result. The spectral reference scale may be any
desired (e.g., energy, wavenumber, wavelength), but the fitting space,
start
values and sr
must be specified in the correct scale.
The arguments start
, lower
, and upper
, must be three
column matrices for models 'Gauss' and 'Lorentz', with center, sigma
('Gauss') or hwhm ('Lorentz') and scale, respectively and peaks per
row. For the 'Voigt' model, it should have four columns, with center, sigma,
hwhm and scale (in this order). The number of absorption bands used depends
on the number of rows and the fitting space is completely defined by the
lower and upper boundaries (may be infinite). The boundaries are enforced by
returning NA on the error function evaluation when optim test parameter
values outside the fitting space.
The spectra to be deconvolved may contain NA, but not sr
,
start
, lower
, and upper
. maxit
and reltol
are passed to optim. A set of error functions is provided: mard
,
rmsd
, mlrt
, and rrsd
. For more details on the Gaussian,
Lorentzian and Voigt parameters, see apeaks
.
The return of optim, with fitted coefficients converted to matrix format for convenience.
Hoepffner, N.; Sathyendranath, S. 1991. Effect of pigment composition on absorption properties of phytoplankton. Marine Ecology Progress Series 73, 11-23. DOI: 10.3354/meps073011
apeaks
, mard
, rmsd
,
mlrt
, and rrsd
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.