This code is a method to quantify doublet absorption lines, fitting two absorptions simultaneously, and provide parameters for exploring aspects of both the shape and size of these absorption lines. The key model in this method used here is the pseudo-Voigt function, which is a linear combination of a Gaussian function and Lorentzian profile.
This work was presented at AAS 243rd meeting as an iPoster.
Work done at Brown Dwarf New York City (BDNYC) and American Museum of Natural History (AMNH)
To cite this work see CITATION
First you need to clone this repository, and open the folder.
git clone https://github.com/BDNYC/Doublet_Quantifier.git
cd Doublet_Quantifier
Next, it needs to be installed.
pip install .
The pseudo-Voigt (
Gaussian distribution:
Lorentzian function:
pseudo-Voigt:
We use this because it is much simpler than the traditional voigt equation, which is a convolution of a Guassian and Lorentzian disrtibution.
The other three pseudo-Voigt input variables correspond to the maximum depth (
Guassian Sigma:
Lorenzian Gamma:
Intensity function:
To fit the doublets, this work uses Python to fit both doublets simultaneously using the pseudo-Voigt model. The code is designed to automate much of the model. The function first requires three inputs from the user: the spectrum as an array, the wavelength range for fitting the continuum, and an approximate wavelength range where the doublet exists.
Then, code does a preliminary fit using a linear continuum fitted to the continuum region. It subtracts this continuum from the spectra before simultaneously fitting two Gaussian distributions to the doublet. The fit is accomplished using SciPy’s curve fit, which optimizes for linear least squares regression. The results of this fit are used to seed a more complex model fit.
Using the preliminary fit, we can constrain the absorption region. Since the absorption region is not stagnate, it can adjust for minor discrepancies in wavelength calibration. The absorption region is determined to be within five standard deviations (
The next step is fitting a linear continuum to sit on top of the detailed continuum as not to miss the wings of the absorption feature. This is done by binning the continuum region (creating small groups of the wavelength values) and taking the maximum flux within each “bin.” The continuum is then fit to these maximum flux values using SciPy to fit a linear model for the continuum.
The linear continuum is subtracted from the data’s flux, and the pseudo-Voigt fits the data. The starting parameters are chosen utilizing the preliminary fit and data features. The preliminary fit is used as the starting parameter for with the FWHM,
The parameters of the fit are optimized twice using SciPy's curve fit, optimizing for least squares regression. The first fit optimizes all the parameters of the pseudo-Voigt, and the second time only adjusts the variable
This method has been developed using seven L dwarfs with medium resolution (R~3000) identified in the SIMPLE Archive and fits well in all but the noisiest of the spectra. This method characterizes the shape and size of these features. It is reliable on a variety of signal-to-noise ratios and is flexible to varying precision of wavelength calibration. The method detailed in this paper adds additional numerical representations of the alkali-line doublets, which can be used to further analyze how different parameters in brown dwarfs affect the spectra. However, while this is the intended use of this Python script, nothing limits its use on absorption doublets to any specific case.