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
 
integrate(self, wave=None)
Integrate the throughput over the specified waveset, if None, integrate over the full waveset.
source code
 
avgwave(self)
Implement the equation for lambda nought as defined in Koornneef et al 1987, p 836.
source code
 
pivot(self, binned=False)
This is the calculation performed when the ETC invokes calcphot.
source code
 
rmswidth(self, floor=0)
Defines the lambda sub rms from Koornneef et al 1987, p 836; should be definition of bandpar.bandw
source code
 
rectwidth(self)
RECTW = INT(THRU) / MAX(THRU)
source code
 
equivwidth(self)
EQUVW = INT(THRU)
source code
 
efficiency(self)
QTLAM = dimensionless efficience = INT(THRU / LAM)
source code
 
check_sig(self, other)
Only call this if check_overlap returns 'partial'.
source code
 
check_overlap(self, other)
Check whether the wavelength range of other is defined everywhere that the wavelength range of self is defined.
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, hkeys=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__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

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.

avgwave(self)

source code 

Implement the equation for lambda nought as defined in Koornneef et al 1987, p 836. Should be equivalent to bandpar.avglam = bandpar.avgwv

pivot(self, binned=False)

source code 

This is the calculation performed when the ETC invokes calcphot. Does this need to be calculated on binned waveset, or may it be calculated on native waveset?

check_sig(self, other)

source code 

Only call this if check_overlap returns 'partial'. Returns True if the LACK of overlap is INsignificant: i.e., it is ok to go ahead and do whatever we are doing.

check_overlap(self, other)

source code 

Check whether the wavelength range of other is defined everywhere that the wavelength range of self is defined. Returns "full", "partial", "none". Normally used for checking whether a spectrum is fully defined over the range of a bandpass. Note that the full overlap case is asymmetric: if the range of 'self' extends past the limits of 'other', this will return a partial overlap.

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

writefits(self, filename, clobber=True, trimzero=True, precision=None, hkeys=None)

source code 
Write the bandpass to a FITS file.
filename:      name of file to write to
clobber=True:  Will clobber existing file by default
trimzero=True: Will trim zero-flux elements from both ends
           by default
precision:     Will write in native precision by default; can be
           set to "single" or "double"
hkeys:         Optional dictionary of {keyword:(value,comment)}
           to be added to primary FITS header


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.