STScI Logo

Observatory Support
STScI Exposure Time Calculators Oversight

Pysynphot Call Descriptions

Imaging countrate

The pysynphot ''countrate'' task has three required parameters: spectrum to calculate, magnitude and passband of spectrum, and science instrument. The information for the ''magnitude and passband of spectrum'' can be (and currently is) specified as part of the ''spectrum to calculate'' parameter. The other parameter is the ''Science instrument'' which is one of the three parts of the observation mode or ''obsmode''.

Spectroscopic countrate

When using the pysynphot countrate task and specifying an observation mode that includes a disperser (grating, grism or prism), there is an additional parameter ''output''. pysynphot will write the countrates, by λ-pixel, to the specified file.

For extended sources and the sky background, these count rates must then be convolved over the width of the aperture (or the width of the target if smaller). In slitless spectroscopy, we use the conservative simplifying assumption that the background is evenly distributed over the entire detector. The alternative would require knowing the exact placement of the target source within the aperture.

Thermal countrate

The contribution from the thermal background in NICMOS observations is calculated by the ''thermback'' task in pysynphot Thermback has only one required parameter, the ''obsmode''.

An example would look like:

thermback.obsmode = ''nicmos,3,f110w''

Effective wavelength

The effective wavelength of an observation is the centroid of the observation in lambda. That is to say, it is the weighted average wavelength of the curve which is the product of the target spectrum and the instrument throughput. The effective wavelength is used in the ETC for any calculation involving a wavelength dependant function such as the fraction of light in a circle of a given radius (for point sources).

The effective wavelength is calculated by the “calcphot” task which has three required parameters: obsmode, spectrum and form. The form is always flam.

An example would look like:

calcphot.obsmode = “acs,hrc,coron,f435w”
calcphot.spectrum = “rn(icat(k93models,3050,0.0,5.0),band(v),20.5,vegamag)”
calcphot.form = “flam”

The output from this example is:

WARNING Spectrum not bounded. Using nearest neighbor: cat
Mode = band(acs,hrc,coron,f435w)
 Pivot Equiv Gaussian
Wavelength FWHM
4310.291 728.5316 band(acs,hrc,coron,f435w)
WARNING Spectrum not bounded. Using nearest neighbor: cat
Spectrum: rn(icat((k93models,3050,0.0,5.0),band(v),20.5,vegamag)
 VZERO EFFLAM Mode: band(acs,hrc,coron,f435w)
0. 4479.662