Making IMPHTTAB Tables

Making IMPHTTAB tables requires a connection to CDBS and that the PYSYN_CDBS environmental keyword point to CDBS.

Use reftools.mkimphttab.create_table() and provide the name of your output file and the base observation mode from which to build a set observation modes for which photometry keywords will be calculated.

Examples of a base observation mode include "acs,hrc", "wfc3,uvis1", or "cos".

Examples

>>> from reftools import mkimphttab
>>> mkimphttab.create_table('acs_wfc1', 'acs,wfc1', 'WFC1',
...                         'Mar 01 2002 00:00:00', clobber=True, verbose=False)  
>>> mkimphttab.create_table('acs_sbc', 'acs,sbc', 'SBC',
...                         'Mar 01 2002 00:00:00', clobber=True)  
reftools.mkimphttab.create_table(output, basemode, detector, useafter, tmgtab=None, tmctab=None, tmttab=None, mode_list=[], nmodes=None, clobber=False, verbose=True)

Create an IMPHTTAB reference file for a specified base configuration, basemode.

Parameters:
outputstr

Output IMPHTTAB filename. (_imp.fits will be appended if only prefix is given.)

basemodestr

Base observation mode for which to generate IMPHTTAB (e.g., acs,hrc). This is ignored if mode_list is given.

detectorstr

Detector name.

useafterstr

Useafter date in the format of MMM DD YYYY HH:MM:SS.

tmgtab, tmctab, tmttabstr, optional

Graph (TMG), component (TMC), and thermal component (TMT) tables to use. If None, the most recent version in CDBS is used.

mode_listlist of str, optional

A list of observation modes which should be used to make an IMPHTTAB reference file. If given, basemode is ignored.

nmodesint, optional

Set to limit the number of modes to calculate. This is for testing only, otherwise set to None.

clobberbool, optional

Overwrite existing IMPHTTAB?

verbosebool, optional

Display extra information.

reftools.mkimphttab.create_table_from_table(output, useafter, imphttab, **kwargs)

Use a previously created IMPHTTAB reference file to generate a new IMPHTTAB reference file.

Parameters:
output, useafterstr

See create_table().

imphttabstr

File name of _imp.fits IMPHTTAB table from which to take observation modes.

kwargsdict

Keywords accepted by create_table(), except mode_list.

reftools.mkimphttab.create_nicmos_table(output, detector, useafter, pht_table, **kwargs)

Use a NICMOS _pht.fits table to generate an IMPHTTAB table for observation modes listed in the given table.

Parameters:
output, detector, useafterstr

See create_table().

pht_tablestr

File name of _pht.fits table from which to take observation modes.

kwargsdict

Keywords accepted by create_table(), except mode_list.

reftools.mkimphttab.compute_values(obsmode, component_dict)

Compute the 3 basic photometric values needed for a given observation mode string using stsynphot.

Values calculated:

  • PHOTFLAM - Unit response in FLAM.

  • PHOTPLAM - Pivot wavelength.

  • PHOTBW - Bandwidth.

Parameters:
obsmodestr

Observation mode for which to calculate values.

component_dictdict

A dictionary in which to cache opened component objects. May be empty.

Returns:
valdictdict

Dictionary with photometry keywords as keys.