StepPolMap¶
- class sofia_redux.instruments.hawc.steps.steppolmap.StepPolMap[source]¶
Bases:
StepParent
Generate a polarization map image.
This pipeline step calls
sofia_redux.visualization.quicklook.make_image
to generate a PNG image for quick-look purposes from polarization data in the input. This step must be run aftersofia_redux.instruments.hawc.steps.StepRegion
. It expects a ‘FINAL POL DATA’ table extension in the input DataFits.The output from this step is identical to the input. As a side effect, a PNG file is saved to disk to the same base name as the input file, with ‘PMP’ replacing the product type indicator.
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:
Read image data and polarization table data.
Generate a plot with vectors overlaid on a flux image.
- setup()[source]¶
Set parameters and metadata for the pipeline step.
Output files have PRODTYPE = ‘polmap’, and are named with the step abbreviation ‘PMP’.
Parameters defined for this step are:
- maphdustr
Extension name to use as the background image.
- lowhighscalelist of float
Specify a low and high percentile value for the image scale, e.g. [0,99].
- scalevecfloat
Scale factor for sizing polarization vectors.
- scalebool
If set, vector lengths are scaled by their magnitude. If not, all vectors will be the same length.
- rotatebool
If set, vectors are rotated to display B-field directions.
- debiasbool
If set, the debiased polarizations are used to determine the vectors.
- colorvecstr
Vector color.
- colorcontourstr
Contour color.
- colormapstr
Image colormap.
- ncontoursint
Number of contour levels.
- fillcontoursbool
If set, the contours will be filled, rather than just overlaid on the image.
- gridbool
If set, a grid will be overlaid on the image.
- titlestr
A title string. If set to ‘info’, a title will be automatically generated.
- centercropbool
If set, the image will be cropped, using the values in the ‘centercropparams’ parameter.
- centercropparamslist of float
Cropping area to use if centercrop = True. Should be a 4-element list of [RA center (deg), Dec center (deg, box width (deg), box height (deg)].
- watermarkstr
Text to add to the plot as a watermark.