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

Class SpectralElement

source code


Base class for a Spectral Element (e.g. Filter, Detector...).

Instance Methods [hide private]
 
validate_units(self)
Ensure that waveunits are WaveUnits
source code
 
__mul__(self, other)
Permitted to multiply a SpectralElement by another SpectralElement, or by a SourceSpectrum.
source code
 
__rmul__(self, other) source code
 
convert(self, targetunits)
Convert to other units.
source code
 
ToInternal(self)
Convert wavelengths to the internal representation of angstroms..
source code
 
__call__(self, wavelengths)
This is where the throughput array is calculated for a given input wavelength table.
source code
 
sample(self, wavelengths)
Provide a more normal user interface to the __call__
source code
 
taper(self)
Taper the spectrum by adding zeros to each end.
source code
 
writefits(self, filename, clobber=True, trimzero=True, precision=None)
Write the bandpass to a FITS file.
source code
 
resample(self, resampledWaveTab)
Interpolate throughput given a wavelength array that is monotonically increasing and the TabularSpectralElement object.
source code
 
unitResponse(self)
Is this correct if waveunits != Angstrom?
source code
 
GetWaveSet(self)
Return the waveset in the requested units.
source code
 
GetThroughput(self)
Return the throughput for the internal wavetable.
source code
 
fwhm(self) source code

Inherited from Integrator: trapezoidIntegration, validate_fluxtable, validate_wavetable

Inherited from Integrator (private): _columnsFromASCII

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

Properties [hide private]
  wave
Waveset for bandpass
  throughput
Throughput for bandpass

Inherited from object: __class__

Method Details [hide private]

__mul__(self, other)

source code 

Permitted to multiply a SpectralElement by another SpectralElement, or by a SourceSpectrum. In the former case we return a CompositeSpectralElement, while in the latter case a CompositeSourceSpectrum.

convert(self, targetunits)

source code 

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

ToInternal(self)

source code 

Convert wavelengths to the internal representation of angstroms.. Note: This is not yet used, but should be for safety when creating TabularSpectralElements from files. It will also be necessary for the ArraySpectralElement class that we want to create RSN.

__call__(self, wavelengths)
(Call operator)

source code 

This is where the throughput array is calculated for a given input wavelength table.

Parameters:
  • wavelengths (ndarray) - an array of wavelengths in Angstroms at which the throughput should be sampled

Property Details [hide private]

wave

Waveset for bandpass

Get Method:
GetWaveSet(self) - Return the waveset in the requested units.

throughput

Throughput for bandpass

Get Method:
GetThroughput(self) - Return the throughput for the internal wavetable.