Description Usage Arguments Value Examples
This function takes a spectrum, which ideally is a high signaltonoise template
spectrum estimated with the estimate_template
function, and the
absorption features found with the findabsorptionfeatures
function
and uses nonlinear leastsquares to fit Gaussians to the features. This follows
the procedure described in Holzer et al. (2020).
1  Gaussfit(wvl, flx, ftrs, cores = 1, mse_max1 = 0.00014, mse_max2 = 1e04)

wvl 
vector of wavelengths of the spectrum 
flx 
vector of normalized flux of the spectrum 
ftrs 
a list of length 2 vectors that each give the lower and upper bounds of found absorption features. The 
cores 
the integer count of cores to parallelize over. If set to 1, no parallelization is done. 
mse_max1 
the maximum mean squared error required for a fit from one Gaussian to be considered a good fit for an absorption feature 
mse_max2 
the maximum mean squared error required for a fit of two Gaussians to be considered a good fit for an absorption feature 
a list with the following components:
parameters 
a dataframe with the wavelength bounds, fitted amplitude, fitted center, fitted spread, and fit type for absorption features with a good fit. A fit type of 0 indicates that the feature had a good fit of a single Gaussian. A fit type of 1 indicates that the feature did not have a good fit with a single Gaussian initially, but after fitting with two it did. 
fitted 
the vector of fitted values (with the same length as the

goodfits 
a vector of the indices for which rows in the 
mse 
a vector with the mean squared error for each of the features in
the 
1 2 3 4 5 6 7 8 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.