pipecal_config

sofia_redux.calibration.pipecal_config.pipecal_config(header)[source]

Parse all reference files and return appropriate configuration values.

Parameters:
headerastropy.io.fits.header.Header or dict-like

Header of FITS file.

Returns:
configdictionary

Key values pulled from the header and calibration files needed for photometry. Possible keys are:

  • caldata : Path to calibration package data directory

  • date : Observation date

  • instrument : Instrument used to take observation

  • runits : Raw (uncalibrated) units for the instrument

  • spectel : Filter name for observation

  • altcfg1 : Alternate configuration (0, 1, 2, or 3). For FORCAST, altcfg1=1 means dual mode with Barr2 dichroic, 2 means dual with Barr3, and 0 means single mode. For FLITECAM, altcfg1=1 means FLIPO configuration, 0 means FLITECAM only. For HAWC+, altcfg1=0 is chop/nod with HWP, altcfg1=1 is chop/nod without HWP, altcfg1=2 is scan with HWP, altcfg1=3 is scan without HWP.

  • object : Object name

  • filterdef_file : File path to filter definition file

  • wref : Reference wavelength, as defined by filterdef_file

  • lpivot : Pivot wavelength, as defined by filterdef_file

  • color_corr : Color correction, as defined by filterdef_file

  • aprad : Aperture radius, as defined by filterdef_file

  • bgin : Background annulus inner radius, as defined by filterdef_file

  • bgout : Background annulus outer radius, as defined by filterdef_file

  • fwhm : FWHM, as defined by filterdef_file

  • fitsize : Subimage size for fits, as defined by filterdef_file

  • refcal_file : File path to reference cal factor file

  • calfac : Series average reference cal factor, as defined in refcal_file

  • ecalfac : Error on series average reference cal factor, as defined in refcal_file

  • avgcal_file : File path to average reference cal factor file

  • avgcalfc : Average reference cal factor, as defined in refcal_file

  • avgcaler : Error on average reference cal factor, as defined in refcal_file

  • rfitam_file : File path to response fit for airmass file

  • rfit_am : A dictionary containing airmass response fit coefficients and metadata, as read from rfitam_file by read_respfile

  • rfitalt_file : File path to response fit for altitude file

  • rfit_alt : A dictionary containing altitude response fit coefficients and metadata, as read from rfitalt_file by read_respfile

  • rfitpwv_file : File path to response fit for water vapor file

  • rfit_pwv : A dictionary containing water vapor response fit coefficients and metadata, as read from rfitam_file by read_respfile

  • stdeflux_file : File path to model error file

  • std_eflux : Percent error on the model of the standard observed, as read from stdeflux_file

  • std_scale : Scale factor to apply to the model of the standard observed, as read from stdeflux_file

  • stdflux_file : File path to standard model file

  • std_flux : Model flux of standard at observed wavelength

Keywords are populated only if matching configuration data is found. In particular, standard model data is returned only if the observation object name matches a known standard, as defined in the stddefault.txt file in the data directory.