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 require 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
  InverseMicron
  _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
 
ismatch(a, b)
Method to allow smart comparisons between classes, instances, and string representations of units and give the right answer.
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.99792458e+18
  H = 6.6262e-27
  HC = 1.9864847852e-08
  ABZERO = -48.6
  STZERO = -21.1
  HSTAREA = 45238.93416
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.