combine_extensions#

sofia_redux.instruments.fifi_ls.combine_nods.combine_extensions(df, b_nod_method='nearest', bg_scaling=False, telluric_scaling_on=False)[source]#

Find a B nod for each A nod.

For asymmetric data, DLAM and DBET do not need to match, B data can be used more than once, and the B needs to be subtracted, rather than added (symmetric B nods are multiplied by -1 in chop_subtract)

For the ‘interpolate’ option for B nod combination for non-OTF data, the time of interpolation is taken to be the middle of the current grating position for the A nod, as determined by the DATE_OBS, C_CHOPLN, C_CYC_B, and C_CYC_R keywords. For OTF data, the time is interpolated between RAMPSTRT and RAMPEND times in the extension header, for each ramp.

Parameters:
dfpandas.DataFrame
b_nod_method{‘nearest’, ‘average’, ‘interpolate’}, optional

Determines the method of combining the two nearest before and after B nods.

bg_scalingfloat, optional

A scaling factor to apply to the background data for B nod combination.

telluric_scaling_onbool, optional

If True, applies telluric scaling during B nod combination.

Returns:
list of fits.HDUList

A list of HDUList objects containing the combined B nod data for each A nod.

Raises:
ValueError

If an invalid B nod method is specified, or if the data is not compatible with the selected method.its.HDUList