-
Notifications
You must be signed in to change notification settings - Fork 0
Overview of the GaussianFit class
The GaussianFit class performs the actual fitting of a Gaussian or integrated Gaussian function to an absorption feature. It takes an instance of Transition and HARPSFile2DScience, plus some optional additional parameters, and returns an instance of GaussianFit containing information on the fit (if successful).
It should be possible to construct an object which GaussianFit would use in place of an instance of HARPSFile2DScience as long as it has the following attributes.
-
barycentricArray: a Numpyarraycontaining barycentric wavelengths for each pixel. -
fluxArray: a Numpyarraycontaining the flux in photo-electrons for each pixel. -
errorArray: a Numpyarraycontaining the uncertainty for each pixel. -
pixelLowerArray: a Numpyarraycontaining the wavelength at the left (lower) edge of each pixel, assuming wavelength increases with increasing pixel count along each row. -
pixelUpperArray: a Numpyarraycontaining the wavelength at the right (upper) edge of each pixel, assuming wavelength increases with increasing pixel count along each row.
Note: for HARPS, these three arrays are 2D, with each row representing an echelle order. I haven't tested it, but I think GaussianFit could handle a 1D array without (much?) modification, as long as it is treated as a 2D array that just happens to have only one row.
Also, while all the other attributes are currently required, pixelLowerArray and pixelUpperArray are only required if GaussianFit is invoked with the integrated option, which uses an integrated Gaussian function to perform the fit.
-
radialVelocity: the heliocentric radial velocity between the Sun and the target of the observation.GaussianFitsearches within a fairly generous 5 km/s range around the wavelength expected by correct for the red/blue-shift of the target, so this doesn't need to too precise; it should be fine to a km/s or two. -
dateObs: adatetime.datetimeinstance, representing the time the observation was taken. -
airmass: the airmass at the time of observation, as a float. -
exptime: the exposure time of the observation, as a float.
-
BERV: the barycentric Earth radial velocity at the time of the observation. Nominally in units of m/s. -
calibrationFile: the name of the file used for getting the coefficients to construct the wavelength scale for the HARPS file, as a string orpathlib.Pathobject. -
calibrationSource: the name of the calibration source, whether a ThAr lamp, a Fabry-Perot etalon, laser frequency comb, etc.
Note: I stored a few pieces of data in each fit in case they were needed later (especially since it would impossible to attach new data once the fitting process had happened), so I'm not 100% sure if these are actually used elsewhere in VarConLib.