The MAROON-X data reduction pipeline produces two types of intermediate data products:
Raw data files with flat light illuminating different fibers are first background subtracted using photutil background fitting and then combined such that all five fibers are illuminated. These flats are most useful for order tracing, optimal extraction algorithms, and blaze correction. Note: bias from the overscan region has been subtracted and the overscan regions removed. The data are in FITS format.
Etalon spectra in the simultaneous calibration fiber leads to low level (~20 counts or less) cross-contamination with object fiber #4 and a defuse background that should be subtracted from the science file. A number of dark frames with the same exposure time and Etalon flux level (controlled by a continuous neutral density filter, see FITS keyword 'HIERARCH MAROONX ND POSITION') taken within a couple days of the science exposure are combined using a sigma clipping mean to remove cosmic ray hits. Note: bias from the overscan region has been subtracted but the overscan regions have not been removed. The data are in FITS format.
1D box- and optimal extracted spectra as well as wavelength vectors and header information are stored in pandas HDF5 store files. Pandas store files use the same file naming convention as the raw fits files but contain data from both camera arms when the camera designator in the file name is set to _x_ instead of _b_ or _r_. Files typically contain the following data structures:
spec_blue - A pandas DataFrame with the reduced data of the blue arm
spec_red - A pandas DataFrame with the reduced data of the red arm
header_blue - A pandas Series with the header information for the blue arm
header_red - A pandas Series with the header information for the blue arm
The pandas DataFrames are Multi-indexed and contain columns for
wavelengths - Wavelength in nm at each 1D pixel incl. instrumental drift correction
box_extraction - Box extracted flux in DN
optimal_extraction - Optimal extracted flux based on Horne (1986) using the flatfield data as the extraction profile
optimal_var - Variance of the optimal extracted flux
Each column is indexed by fiber and order number.
Fiber designation:
Fiber #1 - Sky background fiber
Fiber #2 - Science fiber
Fiber #3 - Science fiber
Fiber #4 - Science fiber
Fiber #5 - Simultaneous calibration fiber
Fiber #6 - A 'virtual fiber' that contains the combined optimal extracted flux of the three science fibers (#2, #3, and #4) with additional outlier rejection. Missing data points (from CCD defects) are interpolated and their associated variance increased so that their effective SNR is almost 0.
Order numbers are physical echelle orders and typically run from 91 to 124 for the blue arm and 67 to 94 on the red arm. This can be confirmed in python
orders_blue = spec_blue.index.levels[1]
orders_red = spec_red.index.levels[1]
A complete example to retrieve a spectrum is shown at the end of this section.
Blaze correction from background subtracted, master flat field files:
The master flatfield file (see intermediate data products above) is 1D extracted like a science frame and a cubic spline is fitted to the flux in each fiber and order. The blaze can be accessed from the hd5 store file of the master flat from datasets blaze_blue and blaze_red. Please note that the blaze is normalized to 1 but is not corrected for the SED of the flat lamp. Dividing by the blaze will thus leave the SED of the star intact