StepStdPhotCal

class sofia_redux.instruments.hawc.steps.stepstdphotcal.StepStdPhotCal[source]

Bases: StepParent

Measure photometry and calibrate flux standard observations.

This pipeline step runs aperture photometry on flux standards in raw units, then applies a standard flux calibration factor to calibrate the flux to physical units (Jy/pixel).

It is assumed that the input data have been opacity-corrected to a reference altitude and zenith angle, and that the calibration factors were derived from flux standards that were similarly corrected. This step should be run after the sofia_redux.instruments.hawc.steps.StepOpacity pipeline step.

Calibration factors are tracked and applied by configuration files and algorithms in the sofia_redux.calibration package:

Photometry routines are also provided by the sofia_redux.calibration package, via:

Methods Summary

run()

Run the data reduction algorithm.

run_phot(cal_conf, kwargs[, write])

Run aperture photometry measurement.

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. Retrieve calibration configuration from the sofia_redux.calibration package.

  2. Run photometry on the Stokes I image.

  3. Multiply flux and error images by the calibration factor. Multiply covariance images by the calibration factor squared.

  4. Set the BUNIT keyword in each extension accordingly (to ‘Jy/pixel’ or ‘Jy2/pixel2’ for covariances).

run_phot(cal_conf, kwargs, write=False)[source]

Run aperture photometry measurement.

Data in self.dataout are used as input. If a ‘PRIMARY IMAGE’ extension is present (as from ScanMap), it is used. Otherwise, a ‘STOKES I’ image is used. Associated error planes are also passed to the photometry algorithm.

Parameters:
cal_confdict

Pipecal configuration information.

kwargsdict

Arguments to pass to the run_photometry function.

writebool, optional

If set, photometry keywords are written to the primary header for the self.dataout DataFits.

Returns:
list of str

Extension names used for photometry.

setup()[source]

Set parameters and metadata for the pipeline step.

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

Parameters defined for this step are:

srcposstr

Initial guess position for photometry, given as “x,y”. If a blank string is provided, the brightest peak in the image will be used as the source position.

fitsizeint

Sub-image size to use for profile fit, in pixels.

fwhmfloat

Initial FWHM for profile fit, in pixels.

profilestr

Profile type for source fit (moffat, gaussian).

apradfloat

Aperture radius for photometry, in pixels.

skyradlist of float

Background annulus radii, in pixels, given as [inner, outer].