Calculate Photometry Keywords from IMPHTTAB
This module includes utilities for calculating the photometry keywords PHOTZPT, PHOTFLAM, PHOTPLAM, and PHOTBW for a given observation mode (obsmode) and IMPHTTAB. The calculations are performed in the same way here as they are in HSTCAL pipeline.
To calculate a single set of keywords use the function get_phot_pars()
.
If you are calculating for several obsmodes from a single IMPHTTAB file it’s
best to use the GetPhotPars
class. For example:
get_phot = GetPhotPars(imphttab)
for obs in obsmodes:
photzpt, photflam, photplam, photbw = get_phot.get_phot_pars(obs)
...
get_phot.close()
- class reftools.getphotpars.GetPhotPars(imphttab)
Class to be used to get photometry parameters from a given IMPHTTAB reference file. Initialize with the name of an IMPHTTAB reference file and then call this class or the
get_phot_pars()
method with a complete obsmode to get the photometry parameters.Example obsmodes are:
'acs,wfc1,f625w,f660n'
'acs,wfc1,f625w,f814w,MJD#55000.0'
'acs,wfc1,f625w,fr505n#5000.0,MJD#55000.0'
- Parameters
imphttab (str) – Filename and path of IMPHTTAB reference file.
- imphttab_fits
Open
HDUList
object fromimphttab
.
- close()
Close
imphttab_fits
attribute.
- exception reftools.getphotpars.ImphttabError
Class for errors associated with the imphttab file.
- reftools.getphotpars.get_phot_pars(obsmode, imphttab)
Return PHOTZPT, PHOTFLAM, PHOTPLAM, and PHOTBW and any other keywords outlined in the table for specified obsmode and imphttab.
- Parameters
obsmode (str) – Complete obsmode string including any parameterized values. For example obsmodes, see
GetPhotPars
.imphttab (str) – Path and filename of IMPHTTAB reference file.
- Returns
results_dict – Dictionary containing the photometric keyword results.
- Return type