hawc_calib¶
- sofia_redux.calibration.standard_model.hawc_calib.hawc_calib(infile, atmofile, outfile=None, iq=5.3, no_atm=False, emiss=0.15, snrval=4.0, alpha=None, temp=None, normfits=False, fscal=1.0, txt=False, noplot=False, dataframe=False)[source]¶
Calculate source flux from calibrated observations.
- Parameters:
- infilestr, pandas.DataFrame
Name of file containing the calibrated model. Typically this is a Herschel model, a blackbody model, or a power law model. The file can be formatted in a FITS file, a pandas DataFrame, or plain ASCII text. If a generic model is preferred,
infile
can be set to ‘Blackbody’ or ‘PowerLaw’, to generate a blackbody or power law model respectively.- atmofilestr
Name of the ATRAN file to use for modelling the atmosphere.
- outfilestr, optional
Name of the file to write the final derived flux. If not provided, try to pull the filename from the contents of
infile
. If that fails, write the model to ‘flux_values.out’.- iqfloat, optional
Image quality d_80. Defaults to 5.3.
- no_atmbool, optional
If set, do not take atmosphere contained in
atmofile
into account. Defaults to False.- emissfloat, optional
Telescope emissivity. Defaults to 0.15.
- snrvalfloat, optional
Signal to noise. Defaults to 4.0.
- alphafloat, optional for non-power law models
If
infile
isPowerLaw
,alpha
is the power law index to use to generate the model.- tempfloat, optional for non-blackbody models
If
infile
is ‘Blackbody’,temp
is the temperature to use to generate the model.- normfitsbool, optional for non-FITS infiles
If set,
infile
is a FITS file.- fscalfloat, optional
Scale factor to apply to fluxes. Defaults to 1.0.
- txtbool, optional
If set,
infile
is a plain text ASCII file.- noplotbool, optional
If set, do not create a plot of the results. Defaults to False.
- dataframebool, optional
If set,
infile
is a pandas DataFrame.
- Returns:
- None
Notes
- Process:
Read in the model of the target flux, which is either a scaled Herschel model for major targets or a scaled blackbody if an asteroid.
Read in the ATRAN file to get the atmospheric transmission as a function of wavelength.
Loop through each HAWC+ filter
Calculate the total transmission (telescope, filter, and instrument).
Calculate the size of the source in pixels
Calculate the total background photon flux from the sky, telescope, window, foreoptics, and instrument.
Several integrals to calculate everything. See Tokunaga, Vacca (2005) for details on what’s happening.
Write results to file