correct_row_gains

sofia_redux.instruments.exes.correct_row_gains.correct_row_gains(data)[source]

Correct odd/even row gain offsets.

Changes are additive only, so associated variance is not propagated.

The procedure is:

  1. Split data into odd and even rows.

  2. Subtract odd data from even data.

  3. Fit the difference with a 1st order polynomial to derive gain offsets.

  4. Use the fit coefficients to correct the odd rows to the even rows.

Parameters:
datanumpy.ndarray

3D data cube [nframe, nspec, nspat].

Returns:
corrected_datanumpy.ndarray

The corrected data.