Data preparation
SSOF models are meant for clean, high-resolution, continuum-normalized spectra. These spectra should be stored in the StellarSpectraObservationFitting.GenericData
and StellarSpectraObservationFitting.LSFData
objects, which are used to ensure that all of the necessary information exists to optimize a SSOF model.
StellarSpectraObservationFitting.GenericData
— TypeGenericData
Holds preprocessed data used to optimize SSOF models
StellarSpectraObservationFitting.LSFData
— TypeLSFData
Holds preprocessed data used to optimize SSOF models (including a matrix that approximates convolution with the instrument line spread function)
The functions for creating these objects from observation .fits files are currently outside of SSOF proper to keep unnecessary dependencies down, but you can see the reformat_spectra function in SSOFUtilities/init.jl (which flags low SNR observations and those with weird wavelength calibration as well as ) and NEID/init.jl for a script using it.
Once the data is collected, we recommend running StellarSpectraObservationFitting.process!
to perform some data preprocessing.
StellarSpectraObservationFitting.process!
— Functionprocess!(d; λ_thres=4000., min_snr=8, kwargs...)
Doing all of the data preprocessing, including continuum-fitting and masking of infinite points, anomalously snappy or high pixels, and low SNR edges.