Calculating WFC3 zeropoints with STSynphot

This notebook briefly shows how to calculate zeropoints and other photometric system values using the python package stsynphot as of January 05, 2021. This is especially useful for calculating Vegamag zeropoints at different times for WFC3/UVIS (as of 01/2021 the WFC3/IR zeropoints are not time dependent). To install stsynphot, activate your conda environment in a bash shell and enter the command pip install stsynphot. More documentation on stsynphot is available here.

Using stsynphot requires downloading the throughput curves for the HST instruments and optical path. One method of doing this is shown below. More information can be found here.

Once the files are downloaded, unpack the files and set the environment variable PYSYN_CDBS to the path of the unpacked files.

1. Set a few inputs

Parameters to set include observation date (in MJD), size of photometric aperture (in arcseconds), and filters to calculate zeropoints for. Note that a six arsecond aperture is considered to be infinite, thus containing all of the flux. The zeropoints posted on the WFC3 website are calculated for an infinite aperture, so when calibrating photometry, aperture corrections should be applied.

These inputs can be changed to match other observations, some example alternate parameters are shown as commented lines.

2. Basic structure

The calculation of the zeropoints starts with creating a specific bandpas object. Bandpasses generally consist of at least an instrument name, detector name, and filter name, though other parameters (such as the MJD and aperture radius shown above) are optional. For example:

Optional parameters are supplied on the end of the basic bandpass:

3. Calculating zeropoints

With the bandpass objects we can now calculate zeropoints, pivot wavelengths, and photometric bandwidths. To calculate Vegamag zeropoints, we need the Vega spectrum to calculate flux in a given bandpass.

4. Multiple bandpasses

To calculate multiple bandpasses for different filter and detectors: (note each detector/filter combination must be valid)

Values can also be written into an astropy table: