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
  • output (str) – Output IMPHTTAB filename. (_imp.fits will be appended if only prefix is given.)

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

  • detector (str) – Detector name.

  • useafter (str) – Useafter date in the format of MMM DD YYYY HH:MM:SS.

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

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

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

  • mode_list (list of str, optional) – A list of observation modes which should be used to make an IMPHTTAB reference file. If given, basemode is ignored.

  • nmodes (int, optional) – Set to limit the number of modes to calculate. This is for testing only, otherwise set to None.

  • clobber (bool, optional) – Overwrite existing IMPHTTAB?

  • verbose (bool, 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
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
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
  • obsmode (str) – Observation mode for which to calculate values.

  • component_dict (dict) – A dictionary in which to cache opened component objects. May be empty.

Returns

valdict – Dictionary with photometry keywords as keys.

Return type

dict