StepSplit

class sofia_redux.instruments.hawc.steps.stepsplit.StepSplit[source]

Bases: StepParent

Split the data by nod, HWP angle, and by additive and difference signals.

This pipeline step takes demodulated R and T data and splits the data by HWP angle and Left/Right nod position. Then, it subtracts the T array from the R array, storing R-T data for each HWP and nod position. It also adds the T array to the R array, storing R+T data for each HWP and nod position. It also identifies and flags for later use any widow pixels: pixels that are good in R, but bad in T, or vice versa.

The Nod Index and HWP Index columns in the demodulated data table are used to identify nod and HWP transition points for splitting. Variances in R and T are propagated to variance arrays for R+T and R-T, and are also stored directly for each nod/HWP combination, for later use in computing covariances.

Input data for this step must contain R Array and T Array images with associated variances, and a DEMODULATED DATA table, containing Nod Index and HWP Index columns. This step is typically run after sofia_redux.instruments.hawc.steps.StepShift.

For each HWP angle M and Nod N this step creates six images: DATA R-T HWP M NOD N, DATA R+T HWP M NOD N, VAR R-T HWP M NOD N, VAR R+T HWP M NOD N, VAR R HWP M NOD N, and VAR T HWP M NOD N. In addition, it creates a table containing the rows corresponding to a given HWP and Nod, named TABLE HWP M NOD N. Finally, it adds a single bad pixel mask image.

Methods Summary

run()

Run the data reduction algorithm.

setup()

Set parameters and metadata for the pipeline step.

Methods Documentation

run()[source]

Run the data reduction algorithm.

Because this step is single-in, single-out (SISO), self.datain must be a DataFits object. The output is also a DataFits object, stored in self.dataout.

The process is:

  1. Find transition points between nod beams and HWP angles.

  2. For each set of nod and angle combination, compute R+T and R-T.

  3. Identify widow pixels and multiply their fluxes by 2 to account for the missing data.

  4. Store the data in separate extensions for each combination.

Raises:
ValueError

If zero chop cycles are found in any of the nod positions.

setup()[source]

Set parameters and metadata for the pipeline step.

Output files have PRODTYPE = ‘split’, and are named with the step abbreviation ‘SPL’.

Parameters defined for this step are:

nod_tolfloat

Nod tolerance, as the percent difference allowed in number of chop cycles between 1st and 2nd left nods, and between left and right nods.

rtarraysstr

Use both R and T arrays (‘RT’), or only R (‘R’) or only T (‘T’).