hispecdrp.primitives.wavesol.drift_correction_primitive

Functions

calculate_drifts_from_line_centers(...[, ...])

Classes

ApplyDriftCorrectionPrimitive([dataset, ...])

Applies the calculated drift corrections to the input data's wavelength grid as a classical Doppler shift.

CalculateEtalonDriftCorrectionPrimitive([...])

Determines the per-etalon-peak drift by matching each etalon peak based on a proximity threshold in wavelength space.

class ApplyDriftCorrectionPrimitive(dataset=None, config=None, context=None, log_config=None, parent=None, **kwargs)[source]

Bases: BasePrimitive

Applies the calculated drift corrections to the input data’s wavelength grid as a classical Doppler shift.

Parameters:
  • input – Level 1 or 2 data product.

  • suffix (str, optional) – Suffix for the output data product. Default is ‘driftcorr’.

  • fiber_reference_map (dict[str, str]) –

    A mapping of fiber numbers to their reference fibers. Example to apply drift from fiber 1 to fibers 1-3.:

    >>> fiber_reference_map = {
            '1' : '1',
            '2' : '1',
            '3' : '1'
        }
    

  • do_orders (Sequence[int], optional) – List of orders to perform drift correction for. If None, all orders will be used.

class CalculateEtalonDriftCorrectionPrimitive(dataset=None, config=None, context=None, log_config=None, parent=None, **kwargs)[source]

Bases: BasePrimitive

Determines the per-etalon-peak drift by matching each etalon peak based on a proximity threshold in wavelength space.

For now, a per-order drift is calculated as the weighted average of the drifts measured in detector pixels. The drift is then converted to effective drifts in wavelength and velocity units according to the local dispersion.

Corrects the wavelength drifts. Currently only the Fabry-Pérot etalons are used to measure and correct for any drifts. Drifts are also currently calculated on a per-order basis which is subject to change as the instrument is characterized.

Calculation and applying the WLS are separate primitives while other WLS sources are under development.

Parameters:
  • input – Level 1 or 2 data product.

  • suffix (str, optional) – Suffix for the output data product. Default is ‘driftcalc’.

  • do_fibers (Sequence[str], optional) – List of fibers to perform drift correction for. If None, all fibers will be used.

  • do_orders (Sequence[int], optional) – List of orders to perform drift correction for. If None, all orders will be used.

Calibrations:

ref_etalon (ReferenceEtalonModel) –