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

Class TabularSourceSpectrum

source code


Class for a source spectrum that is read in from a table.

Instance Methods [hide private]
 
__init__(self, filename=None, fluxname=None, keepneg=False)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_reverse_wave(self) source code
 
__str__(self)
str(x)
source code
 
_readSpectrumFile(self, filename, fluxname) source code
 
_readFITS(self, filename, fluxname) source code
 
_readASCII(self, filename)
Ascii files have no headers.
source code
 
__call__(self, wavelengths)
This is where the flux array is actually calculated given a wavelength array.
source code
 
taper(self)
Taper the spectrum by adding zeros to each end.
source code
 
resample(self, resampledWaveTab)
Interpolate flux given a wavelength array that is monotonically increasing and the TabularSourceSpectrum object.
source code
 
GetWaveSet(self)
For a TabularSource Spectrum, the WaveSet is just the _wavetable member.
source code
 
ToInternal(self)
Convert to the internal representation of (angstroms, photlam).
source code

Inherited from SourceSpectrum: __add__, __mul__, __rmul__, __sub__, addmag, convert, effstim, getArrays, integrate, redshift, renorm, sample, setMagnitude, validate_units, writefits

Inherited from SourceSpectrum (private): _getFluxProp, _getWaveProp

Inherited from Integrator: trapezoidIntegration, validate_fluxtable, validate_wavetable

Inherited from Integrator (private): _columnsFromASCII

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from SourceSpectrum: flux, wave

Inherited from object: __class__

Method Details [hide private]

__init__(self, filename=None, fluxname=None, keepneg=False)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

_readASCII(self, filename)

source code 

Ascii files have no headers. Following synphot, this routine will assume the first column is wavelength in Angstroms, and the second column is flux in Flam.

__call__(self, wavelengths)
(Call operator)

source code 

This is where the flux array is actually calculated given a wavelength array. Returns an array of flux values calculated at the wavelength values input.

resample(self, resampledWaveTab)

source code 

Interpolate flux given a wavelength array that is monotonically increasing and the TabularSourceSpectrum object.

Parameters:
  • resampledWaveTab - new wavelength table IN ANGSTROMS
  • ressampledWaveTab (ndarray)

GetWaveSet(self)

source code 

For a TabularSource Spectrum, the WaveSet is just the _wavetable member. Return a copy so that there is no reference to the original object.