Package pysynphot :: Module units
[hide private]
[frames] | no frames]

Module units

source code

Units class hierarchy: is used to manage both wavelength and flux unit conversions

Warning: vegamag unit conversions import spectrum and locations => circular imports.

Classes [hide private]
  BaseUnit
Base class for all units; defines UI
  WaveUnits
All WaveUnits know how to convert themselves to Angstroms
  FluxUnits
All FluxUnits know how to convert themselves to Photlam
  LogFluxUnits
Base class for magnitudes, which often require special handling
  Angstrom
  Photlam
photlam = photons cm^-2 s^-1 Ang^-1)
  Hz
  _MetricWavelength
Encapsulates some easy unit-conversion machinery.
  Nm
  Micron
  Mm
  Cm
  Meter
  Flam
flam = erg cm^-2 s^-1 Ang^-1
  Photnu
photnu = photon cm^-2 s^-1 Hz^-1
  Fnu
fnu = erg cm^-2 s^-1 Hz^-1
  Jy
jy = 10^-23 erg cm^-2 s^-1 Hz^-1
  mJy
mjy = 10^-26 erg cm^-2 s^-1 Hz^-1
  ABMag
  STMag
  OBMag
  VegaMag
  Counts
Functions [hide private]
 
Units(uname)
This needs to be a factory function in order to return an object of the correct subclass.
source code
 
factory(uname, *args, **kwargs) source code
 
_getDeltaWave(wave)
Compute delta wavelngth for an array of wavelengths.
source code
Variables [hide private]
  C = 2.99792458e18
  H = 6.62620E-27
  HC = H* C
  ABZERO = -48.60
  STZERO = -21.10
  HSTAREA = 45238.93416

Imports: math, N


Function Details [hide private]

_getDeltaWave(wave)

source code 

Compute delta wavelngth for an array of wavelengths. If we had a WaveTable class, this function would be a method on that class: possible refactoring candidate.