StepScanMap

class sofia_redux.instruments.hawc.steps.stepscanmap.StepScanMap[source]

Bases: StepMOParent

Reconstruct an image from scanning data.

Input data for this step are raw HAWC data FITS files.

Output from this step is typically a single output DataFits, with 4 image planes (HDUs): SIGNAL, EXPOSURE, NOISE and S/N. Additionally, binary table HDUs (index 4+) are added for each input scan (controlled by the write.scandata option), which contains original header information for each scan, per-scan reduction summary data, and a binary table of scan data (e.g. pixel gains, weights, per-pixel spectral filter profile, pixel noise spectra etc.).

Methods Summary

check_use_frames(datain, use_frames)

merge_scan_hdr(df, scnhead, datain)

Merge headers from scan output files.

run()

Run the data reduction algorithm.

runend(data)

Clean up after a pipeline step.

setup()

Set parameters and metadata for the pipeline step.

Methods Documentation

static check_use_frames(datain, use_frames)[source]
static merge_scan_hdr(df, scnhead, datain)[source]

Merge headers from scan output files.

The header in the df is updated in place.

Parameters:
dfDataFits

The output data to update.

scnheadfits.Header

The header from the scan output file.

datainlist of DataFits

The list of input data to merge into the output data.

run()[source]

Run the data reduction algorithm.

This step is run as a multi-in multi-out (MIMO) step: self.datain should be a list of DataFits, and output will also be a list of DataFits, stored in self.dataout.

The process is:

  1. Assemble the scan map options from input parameters.

  2. Call the iterative scan map reconstructor.

  3. Retrieve output and update headers as necessary.

runend(data)[source]

Clean up after a pipeline step.

Override the default method to call MISO-style header updating, in the case where a single file is returned.

Parameters:
datalist of DataFits or DataText

Output data to update.

setup()[source]

Set parameters and metadata for the pipeline step.

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

Parameters defined for this step are:

nooutbool

If set, FITS output is not expected and will not be loaded. This may be set for off-nominal reductions, like skydip observations.

subarraystr

Specify the subarrays to use in the reduction. Default is all available (‘R0,T0,R1’).

use_framesstr

Frames to use from the reduction. Specify a particular range, as ‘400:-400’ or ‘400:1000’

gridfloat

Output pixel scale. If not set, default values from scan map configuration will be used.

deepbool

If set, faint point-like emission is prioritized.

faintbool

If set, faint emission (point-like or extended) is prioritized.

extendedbool

If set, extended emission is prioritized. This may increase noise on large angular scales.

optionsstr

Additional options to pass to the scan map algorithm.