Table Of Contents

Previous topic

TSR 2011-4: Comparison of Synphot and Pysynphot Bandpar Functionality

Next topic

References

This Page

Comparison of Synphot and Pysynphot Bandpar Functionality

Author: Matt Davis (SSB)

Date: 15 November 2011

Abstract

Pysynphot attempts to replicate much of the functionality of the Synphot bandpar utility but sometimes uses different formulae and algorithms. This TSR collects the calculations used in Pysynphot, Synphot, the formulae described in the Synphot Manual in Section 5.1 on page 42, and the formulae in the Synphot help files.

RMS Width - BANDW - PHOTBW

Summary

RMS width is added to image headers in the PHOTBW keyword.

Pysynphot

Synphot

Synphot Equations

The Synphot Manual section 5.1 gives the equation for RMS bandwidth as

\lambda_{rms}^2 = \bar{\lambda}^2 \frac{\int P_{\lambda} \ln(\lambda/\bar{\lambda})^2
\,d\lambda/\lambda}{\int P_{\lambda} \,d\lambda/\lambda}

where

\bar{\lambda} = \exp \left[ \frac{\int P_{\lambda} \ln(\lambda) \,d\lambda/\lambda}
{\int P_{\lambda} \,d\lambda/\lambda} \right].

The Synphot function rmslam does appear to implement this procedure for calculating the RMS width of the bandpass. The source code references the WF/PC-1 Instrument Handbook as the source of the equation for RMS width and references Schneider, Gunn and Hoessel (1983 ApJ 264,337) as the source for the equation for mean wavelength.

The bandpar help file gives the same equations as above for the RMS width but the Synphot Manual in section 7.1 gives different equations when describing bandpar. The equations in section 7.1 are the same as used by Pysynphot, shown below.

Pysynphot Equations

The Pysynphot rmswidth source code references Koornneef et al 1987, page 836 as the source for its RMS width calculation, which is

\lambda_{rms}^2 = \frac{\int P_{\lambda} (\lambda - \bar{\lambda})^2 \,d\lambda}
{\int P_{\lambda} \,d\lambda}

where

\bar{\lambda} = \frac{\int \lambda P_{\lambda} \,d\lambda}
{\int P_{\lambda} \,d\lambda}.

Full Width Half-Max - FWHM

Summary

Pysynphot

Synphot

Synphot Equations

The FWHM is simply defined relative to the RMS width above:

fwhm = \sqrt{8\ln 2}\cdot rmswidth

Pysynphot Equations

Pysynphot does not currently implement a FWHM calculation. See https://trac.assembla.com/astrolib/ticket/139.

Equivalent Width - EQUVW

Summary

Pysynphot

Synphot

Synphot Equations

The equivalent width is simply the integral of the throughput:

equvw = \int P_{\lambda}\,d\lambda

Pysynphot Equations

Pysynphot calculates the equivalent width in the same manner as Synphot.

Rectangular Width - RECTW

Summary

Pysynphot

Synphot

Synphot Equations

Synphot calculates the rectangular width at the same time it calculates the equivalent width by simply dividing the equivalent width by the maximum throughput of the passband:

rectw = \frac{equvw}{\max(P_{\lambda})}

This is equivalent to the formula given in section 5.1 of the Synphot Manual:

rectw = \frac{\int P_{\lambda}\,d\lambda}{\max(P_{\lambda})}

Pysynphot Equations

Pysynphot calculates the rectangular width in functionally the same way as Synphot but does not defer any calculation to the equivalent width method. Instead, Pysynphot directly calculates the integral of the throughput and divides by the maximum within the rectwidth method.

Unit Response - URESP - PHOTFLAM

Summary

Unit response is added to image headers in the PHOTFLAM keyword.

Pysynphot

Synphot

Synphot Equations

U_{\lambda} = \frac{hc/A}{\int \lambda P_{\lambda}\,d\lambda}

where h and c are the usual fundamental constants and A is the area of the telescope primary mirror.

Pysynphot Equations

Pysynphot calculates the unit response in the same way as Synphot.

Pivot Wavelength - PIVWV - PHOTPLAM

Summary

Pivot wavelength is added to image headers in the PHOTPLAM keyword.

Pysynphot

Synphot

Synphot Equations

The pivot wavelength equation is recorded in sections 5.1 and 7.1 of the Synphot Manual and matches in both places.

\lambda_p = \sqrt{\frac{\int \lambda P_{\lambda}\,d\lambda}
                 {\int P_{\lambda}\,d\lambda/\lambda}}

Pysynphot Equations

Pysynphot calculates the pivot wavelength in the same way as Synphot.

Wavelength at Peak Throughput - WPEAK

Summary

Pysynphot

  • Function name:
  • Source code:
  • References:

Synphot

Synphot Equations

Like the name implies, this is simply the wavelength at the point of peak throughput. Synphot finds it by looping over the throughput.

Pysynphot Equations

Pysynphot does not currently implement a peak wavelength calculation. See https://trac.assembla.com/astrolib/ticket/139.

Peak Throughput - TPEAK

Summary

Pysynphot

  • Function name:
  • Source code:
  • References:

Synphot

Synphot Equations

This is simply the maximum throughput of the passband. Synphot finds it by looping over the throughput.

Pysynphot Equations

Pysynphot does not currently implement a peak throughput calculation. See https://trac.assembla.com/astrolib/ticket/139.

Average Wavelength - AVGWV

Summary

Pysynphot

Synphot

Synphot Equations

\lambda_0 = \frac{\int \lambda P_{\lambda}\,d\lambda}
             {\int P_{\lambda}\,d\lambda}

Pysynphot Equations

Pysynphot calculates the average wavelength in the same way as Synphot.

Dimensionless Efficiency - QTLAM

Summary

Pysynphot

Synphot

Synphot Equations

qtlam = \int P_{\lambda}\,d\lambda/\lambda

Pysynphot Equations

Pysynphot calculates the efficiency in the same way as Synphot.

Throughput at Reference Wavelength - TLAMBDA

Summary

Pysynphot

  • Function name:
  • Source code:
  • References:

Synphot

Synphot Equations

This is simply the bandpass throughput at a reference wavelength. By default the reference wavelength is the average wavelength as defined above.

Pysynphot Equations

The throughput of a Pysynphot SpectralElement object can be sampled at any wavelength using the sample() method. There is no function specifically for retrieving the throughput at the average wavelength.

Equivalent Monochromatic Flux - EMFLX

Summary

Pysynphot

  • Function name:
  • Source code:
  • References:

Synphot

Synphot Equations

The equivalent monochromatic flux is a combination of unit response, rectangular width, peak throughput and throughput at the average wavelength:

emflx = uresp \cdot rectw \cdot \frac{tpeak}{tlambda}

Pysynphot Equations

Pysynphot does not currently implement an equivalent monochromatic flux calculation. See https://trac.assembla.com/astrolib/ticket/139.

Reference Wavelength - REFWAVE

See the section on average wavelength above.