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

Class SourceSpectrum

source code


Base class for the Source Spectrum object.

Instance Methods [hide private]
 
__add__(self, other)
Source Spectra can be added.
source code
 
__mul__(self, other)
Source Spectra can be multiplied, by constants or by SpectralElement objects.
source code
 
__rmul__(self, other) source code
 
getArrays(self)
Returns wavelength and flux arrays as a tuple, performing units conversion.
source code
 
_getWaveProp(self) source code
 
_getFluxProp(self) source code
 
writefits(self, filename, clobber=True, trimzero=True, binned=False)
Write the spectrum to a FITS file.
source code
 
integrate(self, fluxunits=None) source code
 
convert(self, targetunits)
Convert to other units.
source code
 
redshift(self, z)
Returns a new redshifted spectrum.
source code
 
setMagnitude(self, band, value)
Makes the magnitude of the source in the band equal to value.
source code
 
renorm(self, band, value, unitstring)
Renormalize the spectrum to the specified value (in the specified flux units) in the specified band.
source code

Inherited from Integrator: trapezoidIntegration

Inherited from Integrator (private): _columnsFromASCII

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]
  wave
Wavelength property
  flux
Flux property

Inherited from object: __class__

Method Details [hide private]

__add__(self, other)
(Addition operator)

source code 

Source Spectra can be added. Delegate the work to the CompositeSourceSpectrum class.

convert(self, targetunits)

source code 

Convert to other units. This method actually just changes the wavelength and flux units objects, it does not recompute the internally kept wave and flux data; these are kept always in internal units. Method getArrays does the actual computation.

setMagnitude(self, band, value)

source code 

Makes the magnitude of the source in the band equal to value. band is a SpectralElement. This method is marked for deletion once the .renorm method is well tested.

renorm(self, band, value, unitstring)

source code 

Renormalize the spectrum to the specified value (in the specified flux units) in the specified band. This method should ultimately replace both the renormalize function in this module, and the setMagnitude() method in this class.


Property Details [hide private]

wave

Wavelength property

Get Method:
_getWaveProp(self)

flux

Flux property

Get Method:
_getFluxProp(self)