2.4. Wavelength Calibration Recipes

2.4.1. makeDynamicWavecal

Recipe Library: maroonxdr.maroonx.recipes.sq.recipes_DYNAMIC_WAVECAL
Astrodata Tags: {‘MAROONX’, ‘WAVECAL’}

Process MAROON-X 2D etalon exposures into a dynamic wavelength solution.

This is done in the following steps:

  1. Utilizing the relevant flat, the fibers and orders are traced and identified from the frame. These are extracted into sparse arrays.

  2. Using box extraction, these are converted into 1D spectra. Box extraction is the simple summation of all spatial pixels in a given fiber and order combination. The trace of the ‘box’ is taken from the processed flat field.

  3. The extracted 1D etalon lines are fitted to determine their centroids. This involves identifying the peaks and fitting them to a box convolved with two Gaussians. The locations of the peak centers are stored. The width of the peaks and the Gaussian sigmas vary very slowly along an order and are modeled by low-order polynomials.

  4. The dynamic wavelength solution is computed by fitting the 1D pixel positions and the wavelengths of the etalon lines with a 30 knot cubic spline. Pixel positions are identified by comparison to the static wavelength solution, loaded from a lookup file, which is accurate to about 500 meters per second. This measures the drift of the spectrograph with time and restores an accuracy of 10 to 20 centimeters per second.

The result is stored in the calibration database as a processed wavecal.

Parameters
----------
p : Primitives object
    A primitive set matching the recipe_tags.
def makeDynamicWavecal(p):
    p.prepare()
    p.checkArm()
    p.addDQ()  # just placeholder until MX is in caldb

    p.subtractOverscan()
    p.trimOverscan()
    p.correctImageOrientation()
    p.addVAR(read_noise=True, poisson_noise=True)

    p.extractStripes()
    p.boxExtraction()
    p.getPeaksAndPolynomials()

    p.staticWavelengthSolution()
    p.fitAndApplyEtalonWls()
    p.storeProcessedWavecal(suffix='_wavecal')

2.4.2. makeStaticWavecal

Recipe Library: maroonxdr.maroonx.recipes.sq.recipes_STATICWAVECAL
Astrodata Tags: {‘MAROONX’, ‘ThAr’, ‘WAVECAL’}

Process Thorium Argon exposures towards a static wavelength solution.

A static wavelength solution reference for the science and sim cal fibers is the basis for all wavelength calibrations on MAROON-X data (i.e. dynamical wavecals and science reductions). This recipe currently performs the 2D processing and box extraction of the ThAr frames and stores the result as a processed arc with a “_static_wavecal” suffix. The computation of the static solution itself from the extracted lines is not yet implemented; the pipeline relies on the static solution distributed as a lookup file.

Parameters
----------
p : Primitives object
    A primitive set matching the recipe_tags.
def makeStaticWavecal(p):
    p.prepare()
    p.checkArm()
    p.addDQ()  # just placeholder until MX is in caldb
    p.overscanCorrect()
    p.correctImageOrientation()
    p.addVAR(read_noise=True, poisson_noise=True)
    # Get and save wavelength solution (static ref or frame's sim cal solved)
    # First perform echelle extraction of fibers
    # Gets relevant flat and dark to cut out frame's spectra
    p.extractStripes()
    p.boxExtraction()
    # TODO: second perform static wavecal calculations on the extracted fibers
    #
    p.storeProcessedArc(suffix='_static_wavecal')