get_wave_shift

sofia_redux.spectroscopy.fluxcal.get_wave_shift(flux, correction, shift_limit, model_order, subsample=10)[source]

Get pixel shift between flux and correction curve.

Flux is directly shifted then corrected to determine shift value with lowest RMS, compared to a low order polynomial model.

The correction curve is typically atmospheric transmission * response.

Parameters:
fluxnumpy.ndarray of float

Spectral flux (nw,).

correctionnumpy.ndarray of float

Correction curve (nw,)

shift_limitfloat

Maximum shift to consider.

model_orderint

Polynomial order of continuum model, for calculating optimum residuals.

subsampleint, optional

Subsampling for sub-pixel shifts. Set to 1 to get whole pixel shifts only.

Returns:
float

The wavelength shift in pixels.