### Navigation

- index
- next |
- previous |
- TSR 2011-4: Comparison of Synphot and Pysynphot Bandpar Functionality v2011-4 documentation »

# 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

- Function name: SpectralElement.rmswidth
- Source code: spectrum.py
- References: 3: page 836

Synphot

- Bandpar name: BANDW
- Function name: rmslam called by comppar called by bandpar.
- Source code: rmslam.x
- References: 1: sections 5.1,7.1, 2, 4: page 46

## Synphot Equations

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

where

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

where

# Full Width Half-Max - FWHM

## Summary

Pysynphot

- Function name: SpectralElement.fwhm
- Source code: spectrum.py
- References:

Synphot

- Bandpar name: FWHM
- Function name: fwhmlam called by comppar called by bandpar.
- Source code: fwhmlam.x
- References: 1: section 5.1

## Synphot Equations

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

## Pysynphot Equations

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

# Equivalent Width - EQUVW

## Summary

Pysynphot

- Function name: SpectralElement.equvwidth
- Source code: spectrum.py
- References:

Synphot

- Bandpar name: EQUVW
- Function name: widthlam called by comppar called by bandpar.
- Source code: widthlam.x
- References: 1: section 5.1

## Synphot Equations

The equivalent width is simply the integral of the throughput:

## Pysynphot Equations

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

# Rectangular Width - RECTW

## Summary

Pysynphot

- Function name: SpectralElement.rectwidth
- Source code: spectrum.py
- References:

Synphot

- Bandpar name: RECTW
- Function name: widthlam called by comppar called by bandpar.
- Source code: widthlam.x
- References: 1: section 5.1

## 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:

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

## 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

- Function name: SpectralElement.unit_response
- Source code: spectrum.py
- References:

Synphot

- Bandpar name: URESP
- Function name: funit called by comppar called by bandpar.
- Source code: funit.x
- References: 1: sections 5.1, 7.1

## Synphot Equations

where and are the usual fundamental constants and 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

- Function name: SpectralElement.pivot
- Source code: spectrum.py
- References:

Synphot

- Bandpar name: PIVWV
- Function name: pivlam called by comppar called by bandpar.
- Source code: pivlam.x
- References: 1: sections 5.1, 7.1

## Synphot Equations

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

## 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

- Bandpar name: WPEAK
- Function name: peaklam2 called by comppar called by bandpar.
- Source code: peaklam.x
- References: 1: sections 5.1

## 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

- Bandpar name: TPEAK
- Function name: peaklam2 called by comppar called by bandpar.
- Source code: peaklam.x
- References: 1: sections 5.1

## 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

- Function name: SpectralElement.avgwave
- Source code: spectrum.py
- References: 3: page 836

Synphot

- Bandpar name: AVGWV
- Function name: avglam called by comppar called by bandpar.
- Source code: avglam.x
- References: 1: sections 5.1, 7.1

## Synphot Equations

## Pysynphot Equations

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

# Dimensionless Efficiency - QTLAM

## Summary

Pysynphot

- Function name: SpectralElement.efficiency
- Source code: spectrum.py
- References:

Synphot

- Bandpar name: QTLAM
- Function name: qtlam called by comppar called by bandpar.
- Source code: qtlam.x
- References: 1: section 5.1, 5: page 152

## Synphot Equations

## 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

- Bandpar name: TLAMBDA
- Function name: monolam called by comppar called by bandpar.
- Source code: monolam.x
- References: 1: sections 5.1

## 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

- Bandpar name: EMFLX
- Function name: monolam called by comppar called by bandpar.
- Source code: monolam.x
- References: 1: sections 5.1

## Synphot Equations

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

## 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.

### Navigation

- index
- next |
- previous |
- TSR 2011-4: Comparison of Synphot and Pysynphot Bandpar Functionality v2011-4 documentation »