sofia_redux.instruments.hawc: HAWC+ Data Reduction Algorithms#

The sofia_redux.instruments.hawc package contains data reduction algorithms for the HAWC+ instrument. It is designed to be used with the sofia_redux package, so it does not provide its own interfaces or workflows. See the sofia_redux.pipeline documentation for more information on the pipeline interfaces, or the API documentation below for more information on HAWC algorithms.

Reference/API#

Core Classes#

sofia_redux.instruments.hawc.datafits Module#

Data storage class for FITS images and tables.

Classes#

DataFits([filename, config])

Pipeline data FITS object.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.datafits.DataFits

sofia_redux.instruments.hawc.dataparent Module#

Data storage parent class.

Classes#

DataParent([config])

Pipeline data object.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.dataparent.DataParent

sofia_redux.instruments.hawc.datatext Module#

Data storage class for text-based data.

Classes#

DataText([filename, config])

Pipeline data text object.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.datatext.DataText

sofia_redux.instruments.hawc.steploadaux Module#

Pipeline step that loads auxiliary data.

Classes#

StepLoadAux()

Pipeline step parent class with auxiliary data support.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steploadaux.StepLoadAux

sofia_redux.instruments.hawc.stepmiparent Module#

Pipeline step that processes multiple input objects.

Classes#

StepMIParent()

Pipeline step parent class for multiple input files.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.stepmiparent.StepMIParent

sofia_redux.instruments.hawc.stepmoparent Module#

Pipeline step that processes multiple inputs and produces multiple outputs.

Classes#

StepMOParent()

Pipeline step parent class for multiple output files.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.stepmoparent.StepMOParent

sofia_redux.instruments.hawc.stepparent Module#

Pipeline step that processes a single input object.

Classes#

StepParent()

Pipeline step parent class.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.stepparent.StepParent

Pipeline Steps#

sofia_redux.instruments.hawc.steps.stepbgsubtract Module#

Background subtraction pipeline step.

Classes#

StepBgSubtract()

Subtract residual background across multiple input files.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepbgsubtract.StepBgSubtract

sofia_redux.instruments.hawc.steps.stepbinpixels Module#

Optional pixel binning pipeline step.

Classes#

StepBinPixels()

Bin pixels to increase signal-to-noise.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepbinpixels.StepBinPixels

sofia_redux.instruments.hawc.steps.stepcalibrate Module#

Flux calibration pipeline step.

Classes#

StepCalibrate()

Flux calibrate Stokes images.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepcalibrate.StepCalibrate

sofia_redux.instruments.hawc.steps.stepcheckhead Module#

Header validation pipeline step.

Classes#

StepCheckhead()

Validate headers for HAWC+ raw data files.

HeaderValidationError

Error raised when a FITS header does not meet requirements.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepcheckhead.StepCheckhead, sofia_redux.instruments.hawc.steps.stepcheckhead.HeaderValidationError

sofia_redux.instruments.hawc.steps.stepcombine Module#

Time series combination pipeline step.

Classes#

StepCombine()

Combine time series data for R+T and R-T flux samples.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepcombine.StepCombine

sofia_redux.instruments.hawc.steps.stepdemodulate Module#

Chop demodulation pipeline step.

Classes#

StepDemodulate()

Demodulate chops for chopped and nodded data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepdemodulate.StepDemodulate

sofia_redux.instruments.hawc.steps.stepdmdcut Module#

Chop filtering pipeline step.

Classes#

StepDmdCut()

Filter bad chops from demodulated data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepdmdcut.StepDmdCut

sofia_redux.instruments.hawc.steps.stepdmdplot Module#

Diagnostic plots pipeline step.

Classes#

StepDmdPlot()

Produce diagnostic plots for demodulated data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepdmdplot.StepDmdPlot

sofia_redux.instruments.hawc.steps.stepflat Module#

Flat fielding pipeline step.

Classes#

StepFlat()

Correct for flat response for chop/nod data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepflat.StepFlat

sofia_redux.instruments.hawc.steps.stepfluxjump Module#

Flux jump correction pipeline step.

Classes#

StepFluxjump()

Correct for flux jumps in raw data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepfluxjump.StepFluxjump

sofia_redux.instruments.hawc.steps.stepfocus Module#

Focus analysis pipeline step.

Classes#

StepFocus()

Calculate an optimal focus value from short calibration scans.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepfocus.StepFocus

sofia_redux.instruments.hawc.steps.stepimgmap Module#

Image map pipeline step.

Classes#

StepImgMap()

Generate a map image.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepimgmap.StepImgMap

sofia_redux.instruments.hawc.steps.stepip Module#

Instrumental polarization correction pipeline step.

Classes#

StepIP()

Remove instrumental polarization from Stokes images.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepip.StepIP

sofia_redux.instruments.hawc.steps.steplabchop Module#

Diagnostic lab chop pipeline step.

Classes#

StepLabChop()

Produce diagnostic data for lab chopping.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.steplabchop.StepLabChop

sofia_redux.instruments.hawc.steps.steplabpolplots Module#

Diagnostic polarization plot pipeline step.

Classes#

StepLabPolPlots()

Produce diagnostic plots for lab-generated polarization data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.steplabpolplots.StepLabPolPlots

sofia_redux.instruments.hawc.steps.stepmerge Module#

Mapping pipeline step.

Classes#

StepMerge()

Create a map from multiple input images.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepmerge.StepMerge

sofia_redux.instruments.hawc.steps.stepmkflat Module#

Flat creation pipeline step.

Classes#

StepMkflat()

Create a flat file from internal calibrator data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepmkflat.StepMkflat

sofia_redux.instruments.hawc.steps.stepnodpolsub Module#

Nod subtraction pipeline step.

Classes#

StepNodPolSub()

Subtract low nods from high nods.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepnodpolsub.StepNodPolSub

sofia_redux.instruments.hawc.steps.stepnoisefft Module#

Noise FFT pipeline step.

Classes#

StepNoiseFFT()

Take the FFT of diagnostic noise data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepnoisefft.StepNoiseFFT

sofia_redux.instruments.hawc.steps.stepnoiseplots Module#

Diagnostic noise plot pipeline step.

Classes#

StepNoisePlots()

Produce diagnostic plots for lab-generated noise data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepnoiseplots.StepNoisePlots

sofia_redux.instruments.hawc.steps.stepopacity Module#

Opacity correction pipeline step.

Classes#

StepOpacity()

Apply an atmospheric opacity correction.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepopacity.StepOpacity

sofia_redux.instruments.hawc.steps.steppoldip Module#

Polarization calibration pipeline step.

Classes#

StepPolDip()

Reduce polarized sky dips for instrumental polarization calibration.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.steppoldip.StepPolDip

sofia_redux.instruments.hawc.steps.steppolmap Module#

Polarization map pipeline step.

Classes#

StepPolMap()

Generate a polarization map image.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.steppolmap.StepPolMap

sofia_redux.instruments.hawc.steps.steppolvec Module#

Polarization vector pipeline step.

Classes#

StepPolVec()

Calculate polarization vectors.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.steppolvec.StepPolVec

sofia_redux.instruments.hawc.steps.stepprepare Module#

Raw data preparation pipeline step.

Classes#

StepPrepare()

Prepare input file for processing.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepprepare.StepPrepare

sofia_redux.instruments.hawc.steps.stepregion Module#

Polarization data quality cut pipeline step.

Classes#

StepRegion()

Apply data quality cuts to polarization vectors.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepregion.StepRegion

sofia_redux.instruments.hawc.steps.steprotate Module#

Stokes Q and U rotation pipeline step.

Classes#

StepRotate()

Rotate Stokes Q and U from detector reference frame to sky.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.steprotate.StepRotate

sofia_redux.instruments.hawc.steps.stepscanmap Module#

Scan image reconstruction pipeline step.

Classes#

StepScanMap()

Reconstruct an image from scanning data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepscanmap.StepScanMap

sofia_redux.instruments.hawc.steps.stepscanmapflat Module#

Scan flat field generation pipeline step.

Classes#

StepScanMapFlat()

Generate a flat field from scanning data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepscanmapflat.StepScanMapFlat

sofia_redux.instruments.hawc.steps.stepscanmapfocus Module#

Focus image reconstruction pipeline step.

Classes#

StepScanMapFocus()

Reconstruct an image from short focus scans.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepscanmapfocus.StepScanMapFocus

sofia_redux.instruments.hawc.steps.stepscanmappol Module#

Scanning polarimetry image reconstruction pipeline step.

Classes#

StepScanMapPol()

Reconstruct an image from scanning polarimetry data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepscanmappol.StepScanMapPol

sofia_redux.instruments.hawc.steps.stepscanstokes Module#

Scanning mode Stokes parameters pipeline step.

Classes#

StepScanStokes()

Compute Stokes parameters for scanning polarimetry data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepscanstokes.StepScanStokes

sofia_redux.instruments.hawc.steps.stepshift Module#

Array alignment pipeline step.

Classes#

StepShift()

Align the R and T arrays.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepshift.StepShift

sofia_redux.instruments.hawc.steps.stepskycal Module#

Sky calibration pipeline step.

Classes#

StepSkycal()

Generate a reference sky calibration file.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepskycal.StepSkycal

sofia_redux.instruments.hawc.steps.stepskydip Module#

Skydip plots pipeline step.

Classes#

StepSkydip()

Produce diagnostic plots from skydip data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepskydip.StepSkydip

sofia_redux.instruments.hawc.steps.stepsplit Module#

Data splitting pipeline step.

Classes#

StepSplit()

Split the data by nod, HWP angle, and by additive and difference signals.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepsplit.StepSplit

sofia_redux.instruments.hawc.steps.stepstdphotcal Module#

Flux standard photometry pipeline step.

Classes#

StepStdPhotCal()

Measure photometry and calibrate flux standard observations.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepstdphotcal.StepStdPhotCal

sofia_redux.instruments.hawc.steps.stepstokes Module#

Chop/nod mode Stokes parameters pipeline step.

Classes#

StepStokes()

Compute Stokes parameters for chop/nod polarimetry data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepstokes.StepStokes

sofia_redux.instruments.hawc.steps.stepwcs Module#

WCS registration pipeline step.

Classes#

StepWcs()

Add world coordinate system definitions.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepwcs.StepWcs

sofia_redux.instruments.hawc.steps.stepzerolevel Module#

Zero level correction pipeline step.

Classes#

StepZeroLevel()

Correct zero level for scanning data.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.stepzerolevel.StepZeroLevel

Pipeline Utilities#

sofia_redux.instruments.hawc.steps.basehawc Module#

Utility functions that may be used by multiple pipeline steps.

Functions#

calchilo(chop, nsamp, choptol, good)

Tag data as high, low, or bad.

readchop(step, nsamp, chop_tol[, chopflag])

Read chop state into high, low, or not used values.

readnod(step, nsamp, nod_tol[, nodflag])

Read nod state into high, low, or not used values.

readhwp(step, nsamp, hwp_tol, sampfreq)

Determine HWP state for all samples.

clipped_mean(data, mask[, sigma])

Compute a sigma-clipped mean of the input data.

sofia_redux.instruments.hawc.steps.basemap Module#

Mix-in class for mapping utilities.

Classes#

BaseMap()

Mapping utilities for pipeline steps.

Class Inheritance Diagram#

Inheritance diagram of sofia_redux.instruments.hawc.steps.basemap.BaseMap