StepPolDip

class sofia_redux.instruments.hawc.steps.steppoldip.StepPolDip[source]

Bases: StepParent

Reduce polarized sky dips for instrumental polarization calibration.

This pipeline step derives the instrumental polarization (q and u) from an unchopped, polarized sky dip observation. This step should be run after sofia_redux.instruments.hawc.steps.StepPrepare. The output is a DataFits object with several image extensions, used for diagnostic purposes. The instrumental polarization fraction is stored in the ‘q (instrumental)’ and ‘u (instrumental)’ images.

Notes

The flux is fit with this signal model:

\[F = C + Q_0 cos(4 HWP') + U_0 sin(4 HWP')\]
\[+ V_0 cos(2 HWP') + W_0 sin(2 HWP')\]
\[+ G [1 + q\ cos(4 HWP') + u\ sin(4 HWP')] AM\]
\[+ D (T - T_0)\]
The following parameters from the model fit are stored in the output:
  • \(C\) : FB constant offset

  • \(Q_0\) : Q0 (background)

  • \(U_0\) : U0 (background)

  • \(G\) : radiation gain

  • \(D\) : thermal gain

  • \(q\) : q (instrumental)

  • \(u\) : u (instrumental)

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. Fit the input flux at each pixel with a parametrized model, including the instrumental polarization terms.

  2. Store the fit parameters as images in the output file.

setup()[source]

Set parameters and metadata for the pipeline step.

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

Parameters defined for this step are:

hwp0float

Reference HWP angle.

temp0float

Reference temperature (ADR set point).

maxrmsfloat

Maximum allowed RMS. Pixels with fit RMS values higher than this threshold are set to NaN.