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

Module spectrum

source code

Module: spectrum.py

Contains SourceSpectrum and SpectralElement class defnitions and their subclasses.

Also contains the Vega object, which is an instance of a FileSourceSpectrum that can be imported from this file and used for Vega-related calculations.

Dependencies:

pyfits, numpy

Classes [hide private]
  Integrator
Integrator engine.
  SourceSpectrum
Base class for the Source Spectrum object.
  CompositeSourceSpectrum
Composite Source Spectrum object, handles addition, multiplication and keeping track of the wavelength set.
  TabularSourceSpectrum
Class for a source spectrum that is read in from a table.
  ArraySourceSpectrum
spec = ArraySpectrum(numpy array containing wavelenght table, numpy array containing flux table, waveunits, fluxunits, name=human-readable nickname for spectrum, keepneg=True to override the default behavior of setting negative flux values to zero)
  FileSourceSpectrum
spec = FileSpectrum(filename (FITS or ASCII), fluxname=column name containing flux (for FITS tables only), keepneg=True to override thedefault behavior of setting negative flux values to zero)
  AnalyticSpectrum
Base class for analytic functions.
  GaussianSource
spec = GaussianSource(TotalFlux under Gaussian, central wavelength of Gaussian, FWHM of Gaussian, waveunits, fluxunits)
  FlatSpectrum
spec = FlatSpectrum(Flux density, waveunits, fluxunits).
  Powerlaw
spec=PowerLaw(refwave, exponent, waveunits, fluxunits).
  BlackBody
spec = BlackBody(T in Kelvin)
  SpectralElement
Base class for a Spectral Element (e.g.
  CompositeSpectralElement
CompositeSpectralElement Class, which knows how to calculate its throughput by delegating the calculating the calculating to its components.
  UniformTransmission
bandpass=UniformTransmission(dimensionless throughput)
  TabularSpectralElement
bandpass = FileBandpass(FITS or ASCII filename, thrucol= name of column containing throughput values (for FITS tables only)
  ArraySpectralElement
spec = ArraySpectrum(numpy array containing wavelength table, numpy array containing throughput table, waveunits, name=human-readable nickname for bandpass.
  FileSpectralElement
spec = FileSpectrum(filename (FITS or ASCII), throughputname=column name containing throughput (for FITS tables only), keepneg=True to override the default behavior of setting negative throughput values to zero)
  InterpolatedSpectralElement
The InterpolatedSpectralElement class handles spectral elements that are interpolated from columns stored in FITS tables
  ThermalSpectralElement
The ThermalSpectralElement class handles spectral elements that have associated thermal properties read from a FITS table.
  Box
bandpass = Box(central wavelength, width) - both in Angstroms
Functions [hide private]
 
_computeDefaultWaveset() source code
 
MergeWaveSets(waveset1, waveset2)
Return the union of the two wavesets, unless one or both of them is None.
source code
 
trimSpectrum(sp, minw, maxw)
Creates a new spectrum with trimmed upper and lower ranges.
source code
Variables [hide private]
  PI = 3.14159265
  RSUN = 69599000000.0
  PC = 3.085678e+18
  RADIAN = 2.25554967174e-11
  RENORM = 1.59828661839e-21
  syn_epsilon = 0.00032
  default_waveset = array([ 500. , 500.19760122, ...
  Vega = FileSourceSpectrum(locations.VegaFile)
Variables Details [hide private]

default_waveset

Value:
array([   500.        ,    500.19760122,    500.39528054, ...,
        25969.1985582 ,  25979.46164894,  25989.72879567])