StepLabPolPlots

class sofia_redux.instruments.hawc.steps.steplabpolplots.StepLabPolPlots[source]

Bases: StepParent

Produce diagnostic plots for lab-generated polarization data.

This step makes a two panel figure showing percentage polarization on the left and polarization angle on the right. Histograms are shown below.

This step is intended to be run in place of StepPolMap. All other steps in the standard chop/nod polarimetry pipeline should be run prior to this step. The input data expected is the output of the sofia_redux.instruments.hawc.steps.StepPolVec pipeline step, containing Percent Pol and Pol Angle extensions. Output data for this step is identical to the input data. PNG plots are produced as a side effect and are saved to disk with the same basename and directory as the input data.

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. Read percent polarization and angle from the input.

  2. Restrict data to range specified by parameters.

  3. Plot the data and save to disk.

setup()[source]

Set parameters and metadata for the pipeline step.

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

Parameters defined for this step are:

regionlist of int

Region box given as [xmin, xmax, ymin, ymax].

polrangelist of float

Limit to only use percent polarization in this range, given as [pol_min, pol_max].

anglerangelist of float

Limit to only use polarization angles in this range, given as [angle_min, angle_max], in degrees.