Closed gully closed 3 years ago
Correction--- the twlight flats contain conspicuous sharp solar spectral lines. In our pending Pull Request we employ the quartz lamp calibration files. Ideally we would use the twilight flats if we had a good enough model for the true twilight spectrum.
Currently our deblaze method defaults to spline fitting. Spline fitting may require tuning for spectra with certain genuine large scale features and may introduce signal self-subtraction and bias comparable to target signals in some high precision applications, and so spline debazing should be considered for quick-look purposes only.
Instead, HPF observes twilight flat field spectra that should exhibit smooth continua ideal for deblazing. We should make this strategy the default. @jessicaluna already added support for deblazing by flats
blaze_divide_flats
, that method makes the following assumption for the input:flat
appears to be handed in as a numpy array derived from the FITS file with shape(3 x N_orders x N_wavelength)
with (wavelength, flux, error) columns.Ideally we would like to derive this (possibly pre-processed) flat array from the original FITS file, using muler. So we would want a new series of functions:
pre_process_flat(flat_FITS_file_name)
that creates that(3 x N_orders x N_wavelength)
array.The returned object should follow the new pattern for preserving metadata--- see examples of how other methods use
return ________
. The docstrings should house information on what the inputs and outputs of these functions are.