sofia_redux.calibration.standard_model: Generating Models for Standards¶
Introduction¶
The sofia_redux.calibration.standard_model
module provides some methods for
generating flux models for standard sources, in the standard_model
module. Currently, only HAWC+ standards (usually asteroids or planets)
are supported.
Usage¶
If the pypecal package has been installed, the standard model program can be accessed with the command:
hawc_calibration
The program requires one argument, and has one optional argument. The required argument is the name of a file that lists the object and timestamps to generate models for. An example is:
2016-12-01 05:00:00 Ceres
2016-12-16 05:00:00 Ceres
2017-10-17 11:00:00 Ceres
2017-11-16 07:00:00 Ceres
The first column is the UTC date of the observation. The second column is the UTC time of the observation. The third column is the name of the calibration object. The script will generate a model for each time point in the file.
The script accepts a second, optional argument, which is the name of the desired ATRAN file to use. The script will look for the file in /dps/calibrations/ATRAN/fits. If it cannot find it there, it will try to find it in the limited collection of ATRAN files in this package. If this argument is not provided, the default ATRAN model will be used:
atran_41K_45deg_40-300mum.fits
Output¶
The resulting model is written to a file with the naming pattern:
HAWC_<target>_<date>_<altitude>_<zenith angle>.out
The contents of this file are:
Column |
Title |
Units |
Description |
---|---|---|---|
0 |
lambda_ref |
microns |
Reference wavelength |
1 |
lambda_mean |
microns |
Mean wavelength |
2 |
lambda_1 |
microns |
Mean wavelength weighted by photon distribution |
3 |
lambda_pivot |
microns |
Conversion between F(lambda) and F(nu) |
4 |
lambda_eff |
microns |
Effective wavelength |
5 |
lambda_eff_jv |
microns |
|
6 |
lambda_iso |
microns |
Isophotal wavelength |
7 |
lambda_rms |
microns |
RMS wavelength |
8 |
width |
microns |
|
9 |
Response |
W/mJy |
|
10 |
F_mean |
W/m^2/mum |
Mean flux |
11 |
Fnu_mean |
Jy |
Mean flux in Jy |
12 |
ColorTerm |
k0 |
|
13 |
ColorTerm |
k1 |
|
14 |
Source Rate |
Watts |
Power of source |
15 |
Source Size |
pixels |
Size of source |
16 |
Sorce FWHM |
arcsec |
FWHM of source |
17 |
Bkgd Power |
Watts |
Background Power |
18 |
NEP |
W/sqrt(Hz) |
Noise Equivalent Power |
19 |
NEFD |
Jy/sqrt(Hz) |
Noise Equivalent Flux Density |
20 |
MDCF |
mJy |
|
21 |
Npix |
Number of pixels in source |
|
22 |
– |
Lambda prime |
|
23 |
– |
Wavelength correlation |
|
24 |
Filter |
Name of the filer |
Process overview¶
The overall process is fairly simple. Pass a model of the source flux through the transmission of the system (such as atmosphere, filter, instrument, etc) and calculate the total observed flux in each filter.
Source model¶
The model of the source’s flux is either pull from a Herschel model or generated. Major body source (Neptune, Uranus, Callisto, and Ganymede) are modeled by Herschel. The actual flux the source would generate at the time of the observation is the model flux scaled by the square of the distance ratio of the model and the actual observed distance. The scaling of the model is handled by the modconvert.py.
Asteroid do not have Herschel models, so the model flux needs to be generated. The model is a simple blackbody scaled by the location of the asteroid in the solar system. The generation of the asteroid model is handled by genastmodel2.py.
To handle either of these methods. the location of the source in the solar system at the time of the observation is needed. This is handled by horizons.py. This connects to JPL’s Horizons service using the astroquery package. This determines the ephemeris of the object at the time of obseration and returns the needed data for each model type.
Calibration¶
The source flux is mitigated by the transmission of the light through the atmosphere, the telescope assembly, and the filter. The background light from the sky, telescope, window, etc. are also included. Taking this all into account results in the mean flux from the source in each filter.
Reference/API¶
sofia_redux.calibration.standard_model.hawc_calibration Module¶
Generates models of calibration objects for HAWC+ observations
Functions¶
|
Apply a scale factor to Herschel model to account for distance. |
|
Generate models of the observed flux from a target. |
Determine the location of calibration data. |
|
|
Verify calibration configuration is valid. |
|
Determine if a target is a minor or major target. |
|
Generate the name of the output file for a major target. |
|
Generate the name of the output file for major targets. |
|
Generate the name of the output file for a minor target. |
Generate the name of the output file for a minor target. |
|
|
Entry point for calibration routines. |
|
Determine the distance to a target in a Herschel model. |
|
Generate a model for a major target. |
|
Generate a model for a minor target. |
|
Parse the arguments for configuring calibrations. |
|
Pull the alittude and zenith angle from the ATRAN filename. |
|
Read in when the observations took place. |
|
Determine the scale factor for accounting for distance to target. |
|
Determine the correct Herschel model to use for the target. |
sofia_redux.calibration.standard_model.hawc_calib Module¶
Generate a thermal model for a given object at a specified time
Functions¶
|
Calculate source flux from calibrated observations. |
Define the temperatures of background sources. |
sofia_redux.calibration.standard_model.genastmodel2 Module¶
Generate thermal models for asteroids.
Functions¶
|
Generate a model of the flux from an asteroid. |
|
Check the command line arguments are valid. |
|
Interpolate the thermal model at key filter wavelengths. |
|
Parse the command line arguments. |
|
Write all models to file. |
sofia_redux.calibration.standard_model.horizons Module¶
Query the Horizons database at JPL for object information
Functions¶
|
Queries the JPL Horizons database for asteroid information. |
Configure query to JPL Hoizons. |
|
|
Query Horizons for orbital elements. |
|
Query Horizons for ephemerides. |
|
Configure an object to query Horizons. |
|
Parse out key fields from Horzions query results. |
|
Parse orbital elements for physical property. |
|
Query the JPL Horizons database to get the distance to the target. |
|
Double-check that the Horizons query was for the correct object. |
sofia_redux.calibration.standard_model.modconvert Module¶
Scale models to account for object distance
Functions¶
|
Scale a Herschel model by a constant factor. |
|
Plot the scaled Herschel model. |
|
Read in a Herschel model. |
|
Sort the flux and brightness temp by increasing wavelength. |
|
Write the scaled Herschel model to file. |
sofia_redux.calibration.standard_model.thermast Module¶
Generate a themeral model of an asteroid
Functions¶
|
Calculate the modified blackbody flux from the asteroid. |
|
Calculate correction factor from asteroid's phase angle. |
|
Calculate the thermal flux from a blackbody object. |
|
Evaluate the Planck function. |
|
Create a model of the thermal flux from an asteroid. |
sofia_redux.calibration.standard_model.background Module¶
Derive flux expected from background sources
Functions¶
|
Calculate the first background integral. |
|
Calculate the second background integral. |
|
Coefficient of the background integral for each source. |
|
Background power in the extraction area. |
|
Setup planck functions for each non-target source. |
|
Calculate scale factors for terms in background_intetgral_2. |
|
Integrate the functions set up in |
|
Define all the integrands to be used. |
sofia_redux.calibration.standard_model.calibration_io Module¶
Handle file I/O for model generation
Functions¶
Location of local calibration data. |
|
|
Generate a simple blackbody spectrum. |
|
Generate a power law input spectrum. |
|
Read in or generate model spectrum. |
|
Open the outfile and print all headers. |
|
Generate a plot of the final spectrum. |
|
Read in atmospheric transmission model. |
|
Read spectrum from a FITS file. |
|
Read spectrum input file if formatted in plain text. |
|
Format the result of the calibration and report it. |
|
Select out a window of unique wavelengths. |
sofia_redux.calibration.standard_model.derived_optics Module¶
Calculate properties of observations derived from the models
Functions¶
|
Only select out wavelength and fluxes in a given filter. |
|
Calculate the color terms k0 and k1. |
|
Calculate the flux from the model at reference wavelengths. |
|
Calculate the minimum observable flux. |
|
Calculate the mean flux. |
|
Calculate the mean number of pixels in the beam. |
|
Calculate the noise-equivalent power. |
Calculate the quality of the pointing optics. |
|
|
Calculate the instrument response. |
|
Calculate various optical properties of the source. |
|
Compute the source size. |
sofia_redux.calibration.standard_model.isophotal_wavelength Module¶
Calculate various isophotal wavelengths
Functions¶
|
Calculated the isophotal wavelengths. |
|
Calculate various characteristic wavelengths. |
|
Find where the flux is equal to the mean flux. |
|
Interpolates v(x) at points xout. |
|
Calculate the isophotal wavelengths for a power law model. |
|
Calculate the isophotal wavelengths from zero points. |