STScI Logo

Hubble Space Telescope

January 1999 (Previous Updates: May 1997, June 1996, and August 1995)

- S. Baggett


The SYNPHOT package in STSDAS has three primary uses: 1) to provide photometric calibration information, which is inserted by the calibration software into image headers: (keywords photflam, photbw, etc), 2) to estimate exposure times for HST observations and, 3) to use synthetic photometry to calibrate observations.

This "README" file addresses:

History of WFPC2-Related SYNPHOT Updates
SYNPHOT Tables and Pipeline Processing
Updating Calibrated Pipeline Files with New SYNPHOT Results
Estimating Exposure Times
Summary of SYNPHOT Tables
Retrieving the Files
Setting Up Your Environment to Run SYNPHOT
Appendix A: List of Tasks in the SYNPHOT Package
Appendix B: List of All WFPC2-related SYNPHOT Tables

History of SYNPHOT Table Updates:

Date		Reason for update

Jan 1999	UV contamination tables updated
May 1997	all UV modes updated, some redward ones as well
June 1996	minor update, affects fqch4p15, fqch4n15, fquvn* only
July 1995	major update, all obsmodes affected
End of 1993	prelaunch population of tables

The WFPC2 time-dependent photometric calibration tables (wfpc2_cont*) in SYNPHOT have been updated. Note that the contamination tables are not used by calwp2 but must be invoked manually in SYNPHOT.

Updates were based upon an analysis of the WFPC2 stellar photometric monitoring data obtained over the last four years. The new analysis showed that, for bright targets, (1) the long-term photometric throughput continues to be quite stable: fluctuations are ~2% or less peak-to-peak over 4 years in filters longwards of and including F336W, (2) the UV throughput has gradually evolved, that is, the clean count rates (immediately after the decons) have increased over the 4 years in some filters, e.g., F160BW by ~12% in the PC, and F170W by ~9%, while decreasing slightly in others, e.g., F255W by ~3% and, (3) the contamination growth rates have slowed slightly for the UV filters, e.g., ~1% per day to 0.5% per day in F160BW on the PC. More details on the SYNPHOT contamination table update can be found in ISR 98-03.

Based upon calibration data of grw+70d5824, all UV filters shortward of F439W were updated as well as some of the more frequently-used broadband filters redward of F439W (F450W, F555W, F606W, F675W, F702W, F785LP, F791W, F814W, F850LP, and F1042M). Changes were installed in the OPUS pipeline May 16,1997. The changes are described in detail in ISR 97-10.

In addition, a couple of bugs in the tables (which had been effectively canceling each other out) were corrected: the WFPC2 obstruction factor and the aperture correction are now included in the wfpc2_optics table. In previous versions, the SYNPHOT tables were intended to be for 0.5" data, but due to the missing obscuration factor, mimicked data measured at 3". The new wfpc2_optics table was generated by multiplying its throughput by 0.9108 (WFPC2 obstruction) and dividing by the aperture correction (10^(-apcorr/2.5). NOTE: aperture correction used at all wavelengths was 10%.

With a few exceptions, changes to non-UV filter modes were relatively minor: generally ~1-2% or less (F785LP, F850LP, and F1042M were more: ~1-4%, ~1-6$, and ~2-15% for them respectively, depending on the chip.). The UV filters required somewhat larger changes to bring SYNPHOT into agreement with the observations, ranging from ~2% (e.g., F255W and F300W) to ~5% (F170W, F218W) to 10% or more (F160BW, F375N).

Based upon calibration data of grw+70d5824, the methane and [OII] filter tables were updated to yield improved SYNPHOT countrate predictions when compared to the observations.

Tables affected were: filter curves for fqch4p15, fqch4n15, and fquvn*. Note that the unrotated methane quad (fqch4n) was not changed; it will be updated when additional calibration data becomes available. The new tables are available for ftp retrieval; changes will take effect in the routine pipeline end of June 1996. Filter tables were multiplied by:

Filter+aperture		FOV	Wavelength	Scaled by
------------------      ----    ----------      ---------
fquvn,wf2		wf2	  3986		  0.913
fquvn,wf3		wf3	  3916		  0.865
fquvn,wf4		wf4	  3839		  0.938
fquvn33,fquvn33		wf2	  3763		  1.038

fqch4n33,fqch4n33	wf2/3	  6193		  0.949
fqch4n15,fqch4n15	pc1	  6193		  0.949
fqch4n,fqch4w3		wf3	  8929		  0.698
fqch4p15,fqch4p15	pc1	  8929		  0.698

A major WFPC2-related update was done in July 1995 and all files are available for ftp retrieval; the changes will take effect in the routine PODPS pipeline in Aug. 1995. The new tables bring SYNPHOT into general agreement with the results presented in the WFPC2 Instrument Handbook and in Photometric Performance and Calibration of WFPC2 by Holtzman et al. (PASP 107,1065).

Tables affected include the wfpc2_optics, dqe curves, contamination correction tables, and many, but not all, filter transmissions (see Holtzman paper).

SYNPHOT Tables and Pipeline Processing:

The pipeline calibration software calwp2 uses the WFPC2-related SYNPHOT tables to populate the photometric keywords in the calibrated header (c0h); the data itself is not changed. The keywords used are:

Keyword		Description			Example

PHOTMODE	Photometry mode			WFPC2,1,A2D7,F300W,,CAL
PHOTFLAM	Inverse sensitivity 		5.926793E-17 
PHOTZPT		Zero point			-21.1 mag
PHOTPLAM	Pivot wavelength		2990.016 Å
PHOTBW		RMS bandwidth of the filter	324.5099 Å
GRAPHTAB	HST graphtable used in pipeline f7d1401pm.tmg
COMPTAB		HST comptable used in pipeline	f7d1400mm.tmc

The PHOTFLAM is the flux conversion factor, the flux that produces 1 count/sec in the passband. These are all group keywords (accessible via STSDAS task hedit or imhead, for example), so that there is a set for each chip used.

The graphtab/comptabs names used in the pipeline are based on the time of installation; for the July 1995 update, the GRAPHTAB and COMPTAB names should be f7* or later (f=year since 1980, 7 is month, d is day). Note: other instruments use the graph and comp tables as well, so there may be new tables installed in the pipeline after July 1995 but these will contain the same WFPC2-related data as the f7d* tables above. Any future WFPC2 changes will be documented in this readme file.

The c0h header file from the pipeline contains HISTORY keywords which provide a detailed list of the SYNPHOT table versions that were used to populate the photometric keywords, for example, the SYNPHOT HISTORY keywords for PC1 in an f300w observation:

HISTORY   The following throughput tables were used:
HISTORY   crwfpc2comp$wfpc2_optics_006_syn.fits,
HISTORY   crwfpc2comp$wfpc2_dqepc1_005_syn.fits,
HISTORY   crwfpc2comp$wfpc2_flatpc1_003_syn.fits      

If you are using STSDAS SYNPHOT software directly, the showfiles task provides a quick check of the tables that would be used by SYNPHOT tasks. For the example above:

> showfiles wfpc2,1,a2d7,f300w,cal

where "crotacomp" and "crwfpc2comp" are the directories containing the named tables.

Updating Calibrated Pipeline Files with New SYNPHOT Results:

If you've ascertained from the c0h file (via GRAPHTAB and COMPTAB names or HISTORY records or 'getref') that the most recent SYNPHOT tables were not used, you may wish to update their values. This can be done by either re-requesting your data from the HST archive (the mose appropriate SYNPHOT tables and reference files will automatically be applies or by running SYNPHOT directly. If you're already planning on re-retrieving your data for other reasons, the first method may be easier; if you don't need to use the HST archive, the SYNPHOT task, 'bandpar', may be used in conjunction with the PHOTMODE header keyword to obtain the values that would have gone into the rest of the photometric keywords. For the f300w example above, retrieve photmode keyword with hedit, then run bandpar. To differentiate the iraf commands from output, we've prefaced command lines with the IRAF prompt symbol ">".

> hedit *101t.c0h[1] photmode . 
u2ou0101t.c0h[1],PHOTMODE = WFPC2,1,A2D7,F300W,,CAL

> bandpar wfpc2,1,a2d7,f300w,cal output="" photlist=all wavetab=""
# OBSMODE                      URESP          PIVWV          BANDW
wfpc2,1,a2d7,f300w,cal     5.9268E-17          2990.         324.5
# OBSMODE                      TPEAK          EQUVW          RECTW
wfpc2,1,a2d7,f300w,cal      0.0028794         2.4609         854.65
# OBSMODE                      EMFLX        REFWAVE        TLAMBDA
wfpc2,1,a2d7,f300w,cal     5.8289E-14        3010.7      0.0025022

The output is defined in detail in the online bandpar help and in the SYNPHOT User's Guide (PDF); the bandpar output is related to the photometry header keywords:

PHOTZPT  == is always -21.1 mag

For record-keeping, if you wish to update your headers with the bandpar results, the stsdas task hedit is best:

> hedit u2ou0101t.c0h[1] photflam value="5.9268E-17" 
> hedit u2ou0101t.c0h[1] photplam value="2990."


If narrowband filters were used, we recommend you generate your own wavetab (the default stepsize is sometimes not small enough for some of the narrower filters). The wavelength table can be constructed with the SYNPHOT task "genwave" and used as the wavetab in the bandpar expression; for example:

> genwave minwave=1000. 
          maxwave=10000. dwave=1.
> bandpar wfpc2,1,a2d7,f300w,cal output="" 

None of the SYNPHOT tasks will change the wavetab in any way, so once you've generated one, it can be used for all of your SYNPHOT computations.

Estimating Exposure Times:

The main SYNPHOT routine for estimating exposure times is calcphot, which is a very powerful and versatile task; below is just one example of the many ways in which it may be used. You will need to have the SYNPHOT tables available as well as any spectra that you are interested in using. All the tables in the cdbs directories are in the form of binary STSDAS tables.

Some of the spectral directories are:

calspec		spectra of HST flux calibration targets
bkmodels	stellar flux spectra calculated by Kurucz and Buser
bpgs		Bruzual et al. spectral (extension of Gunn/Stryker optical atlas)
bz77		Bruzual stellar spectra
gunnstryker	from observations of Gunn and Stryker (ApJSupp 52,121)
jacobi		from observations of Jacoby et al (ApJSupp 56,257)

All spectra are accessible via the CDBS pages or via anonymous ftp to Each of these directories have README files, with short listings of table names, objects, and spectral types. Before retrieving all tables, you may wish to view these README files to select only certain spectra. For example, after ftp'ing to anonymous:

cd cdbs/grid/bpgs
!page README


#  Spectral types are taken from Gunn and Stryker
#  paper, ApJ Supplement 52:121-153, 1983 June
#Filename_________Target__________Type       9-SGR            O5       9-SGE            O8F       HR8023           O6       BD-01D935        B1V

Remember to type "binary" at the ftp prompt before retrieving any of these tables, since these are STSDAS tables.

Appendix B of the SYNPHOT User's Guide (PDF) discusses all the SYNPHOT tasks in more detail and the Appendices discuss the available spectra in more detail.

If the online spectra aren't sufficient, you may also generate your own, for example, by using the SYNPHOT calcspec task, which can create blackbody, powerlaw, and rectangular, to name a few. Type "help calcspec" at the iraf prompt or see the SYNPHOT User's Guide (PDF) for more details about its capabilities.

Once you have the spectra, calcphot can be used to obtain a countrate:

> calcphot wfpc2,1,a2d7,f300w spectrum="" 

Mode = band(wfpc2,1,a2d7,f300w)
Pivot       Equiv Gaussian
Wavelength         FWHM
 2990.012        764.1473    band(wfpc2,1,a2d7,f300w)
Spectrum:  /tib/cdbs/calspec/
  VZERO      (COUNTS s-1 hstarea-1)
    0.           2275.741

Note that if you do not specify an a2d gain, the result is in electrons; the output reads "(COUNTS s-1 hstarea-1)" regardless of whether the result is in electrons or DN. Also note that the July 1995 SYNPHOT tables already contain the flatfield component in the filter tables, so adding "cal" to the obsmode will not change the countrate.

To have calcphot include the contamination effect, you must add the cont# keyword to the obsmode. The STSDAS epoch task converts date to Modified Julian Date, MJD. For example, the June 1995 decon occurred June 2; to compute the decrease in throughput 21 days after a typical decon, run calcphot using MJD for June 24:

> epoch "june 24,1995" qual="" dmy_style=mdy printout=date,mjd
 24 Jun 1995 00:00:00.00000            SAT
MJD  49892.0000000000

> calcphot wfpc2,1,a2d7,f300w,cont#49892.0 
           spectrum="" form=counts

Mode = band(wfpc2,1,a2d7,f300w,cont#49892.0)
Pivot       Equiv Gaussian
Wavelength         FWHM
 2995.8        766.9841    band(wfpc2,1,a2d7,f300w,cont#49892.0)
Spectrum:  /tib/cdbs/calspec/
 VZERO      (COUNTS s-1 hstarea-1)
    0.           2202.372

Check the online iraf help (type "help calcphot") or the SYNPHOT User's Guide (PDF) for details on the variations possible with the calcphot task. For example, the calcspec/calphot step can be combined by giving a filename to calcphot's spectrum parameter; the file should contain the some function commands you would have given calcspec.

More details on exposure time estimation can be found in the Frequently Asked Questions about WFPC2 Exposure Times. Also online is the WFPC2 Exposure Time Calculator.

Summary of SYNPHOT Tables:

To run SYNPHOT for wfpc2-related observations, you will need the 2 general tables (graph and comp tables), the wfpc2-related tables, and any necessary spectral data tables (discussed in section on Estimating Exposure Times, above).

The graph and comp tables (tmg, tmc) can be found in:

mtab$ (ie, s8i22541m_tmc.fits,s4e2027sm_tmg.fits)

The name is a timestamp for installation into the routine pipeline processing system (s=year, 8=month, i=day, 22=hours, 54=minutes).

The graphtab entries correlate keywords from the observation mode with component table rootnames; generally these do not change much, unless new observation modes are added. For example, the "f1042m" keyword in an observation mode will point to a component table rootname: "wfpc2_f1042m".

The comptab entries correlate the component table rootname from graphtab with specific filenames; for the f1042m example, the component table rootname "wfpc2_f1042m" points to the file "crwfpc2comp$", where the name preceding the '$' refers to the directory, and the name after refers to the specific file SYNPHOT will use for an f1042m observation.

WFPC2-related tables consist of:

a2d   (separate ones for each gain and chip)
dqe   (efficiency tables, one for each chip)
flat  (flatfield table; currently these are dummy tables 
       set to 1, as the flatfield information is already 
       contained in the wfpc2 optics table)
filter tables (one for each filter element, names like: 
       wfpc2_f300w_003, where 003 refers to version number 
       of table)
cont  (contamination tables, invoked with "cont#" in the 
       obsmode, one per chip)

For a typical observation mode, you will normally see at least the ota, optics, filter, dqe tables in the path; specifying "cal", "a2d7" (or "a2d15"), and "cont#" followed by MJD, you will also see the flat, a2d, and cont tables. For example:

> showfiles wfpc2,3,f555w          

> showfiles "wfpc2,3,f555w,a2d15,cal,cont#49943.0"

Note that if you wish to include the contamination tables, you must enclose the obsmode in quotes.

Retrieving the Files:

Note that all SYNPHOT tables are in binary STSDAS format, readable only with tasks in the IRAF/STSDAS ttools and SYNPHOT packages. The history and version of each new table is included in the table header, which can be viewed with, for example, tdump:

	> tdump | page

The tables are available via anonymous ftp to, in 'cdbs/comp/wfpc2' and the OTA tables are in 'cdbs/comp/ota' or from the direct links for the WFPC2 SYNPHOT throughputs and for OTA.

To retrieve via FTP, for example:

anonymous	- use your email address as password
binary		- set retrievals for binary files
prompt		- turn off prompt
cd cdbs/comp/wfpc2
get wfpc2tar	- fetch tarfile of wfpc2-related SYNPHOT files,
		  (includes the files from ota)

Note: the tarfile includes the recent May 1997 graph and comp tables, which were the earliest tables to contain the most recent wfpc2-related SYNPHOT update. If you intend to use SYNPHOT for other instruments as well, you may wish to retrieve the most recent graph and comp tables, that is:

cd cdbs/mtab
mget *tmc
mget *tmg

Setting Up Your Environment to Run SYNPHOT:

Assuming that you already have IRAF and STSDAS running at your site (if not, please see References), once back on your system, unpack the tarfile:

tar xvf wfpc2tar

Set some logicals within IRAF:

> set mtab=localdir	  - for directory containing graph/comp tabs
> set crotacomp=localdir  - dir containing ota file
> set crwfpc2comp=local   - dir containing wfpc2 files

Point SYNPHOT to these new files, from within IRAF type:

> unlearn refdata

which will set refdata parameters to:

refdata.area = 45238.93416
refdata.grtbl = "mtab$*.tmg"
refdata.cmptbl = "mtab$*.tmc"
refdata.mode = "a"

where the graph and comptab pointers will choose the latest timestamp file in the previously defined mtab directory; or, you can insert the entire table name by:

> epar refdata

and editing in the appropriate names (ie, crcomp$ for grtbl, etc).

References: (410-338-1082), for paper copies of the online documents.

SYNPHOT User's Guide (PDF) from STSDAS Documentation page.

FTP site for SYNPHOT tables.

Atlases of model and observed spectra for use in SYNPHOT on the CDBS page.

WFPC2 Documentation for further information on exposure time estimations and WFPC2 Photometry.

STSDAS homepage for software, documentation, and user support.

WFPC2 Homepage for the top-level WFPC2 Instrument Page.

HST Homepage for the top-level HST page.

Appendix A: List of Tasks in the SYNPHOT Package:

The STSDAS SYNPHOT package currently contains the following tasks (type "help synphot" at the IRAF prompt):


Menu for the package stsdas.hst_calib.synphot:

  bandpar - Calculate photometric parameters of a passband.
  calcband - Calculate a model passband.
  calcphot - Calculate photometric quantities for spectra and passbands.
  calcspec - Calculate a model spectrum.
  countrate - Evaluate the photometric count rate of the HST.
  fitband - Fit a passband model to data using Amoeba simplex method.
  fitgrid - Fit a spectrum model to a grid of spectral data.
  fitspec - Fit a spectrum model to data using Amoeba simplex method.
  genwave - Interactively generate a wavelength set.
  grafcheck - Check an instrument graph table for bad rows.
  graflist - List the components downstream from a given component.
  showfiles - Print filenames used in a SYNPHOT expression
  grafplot - Plot the components downstream from a given component.
  imspec - Convert an image to a SYNPHOT spectrum or vice versa.
  plband - Plot a set of passbands.
  plratio - Plot the ratio of observed to synthetic spectral or photometric data.
  plspec - Plot spectral and photometric data.
  pltrans - Plot photometric transformation diagrams
           (e.g., color-color or color-magnitude).
  obsmode - Display observation mode keywords for an instrument
  refdata - Pset to specify common SYNPHOT parameters.

Type "help synphot opt=sys" for a description of files used by these tasks.
Type "help" followed by taskname for details on a particular task.

Appendix B: List of all Most Recent WFPC2-related SYNPHOT Tables:

from MTAB subdirectory (most recent table with WFPC2-related changes)


from OTA subdirectory.


from WFPC2 subdirectory (.fits files)