StepCheckhead

class sofia_redux.instruments.hawc.steps.stepcheckhead.StepCheckhead[source]

Bases: StepParent

Validate headers for HAWC+ raw data files.

This step checks the primary header of the input file for keywords required for data reduction. It also reformats the filename stored in the DataFits object, to conform to SOFIA requirements.

This step should be called before any other steps, on raw HAWC data. Output from this step is identical to the input except for the filename; it should not be saved to disk.

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 required keyword types and limits from a configuration file (usually in pipeline/config/header_req_config.cfg).

  2. Check the primary header of the input file for compliance and output error messages if necessary.

  3. Rename the output file to SOFIA standard format.

Raises:
HeaderValidationError

If any errors are found and the parameter ‘abort’ is True.

setup()[source]

Set parameters and metadata for the pipeline step.

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

Parameters defined for this step are:

abortbool

If set, this step will raise a HeaderValidationError if the input header does not meet requirements. Otherwise, it will only issue warnings.

headerdefstr

Path to the header keyword definition file, usually stored in data/config/header_req_config.cfg.