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

Class ArraySourceSpectrum

source code


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)

Instance Methods [hide private]
 
__init__(self, wave=None, flux=None, waveunits='angstrom', fluxunits='photlam', name='UnnamedArraySpectrum', keepneg=False)
Create a spectrum from arrays.
source code

Inherited from TabularSourceSpectrum: GetWaveSet, ToInternal, __call__, __str__, resample, taper

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, wave=None, flux=None, waveunits='angstrom', fluxunits='photlam', name='UnnamedArraySpectrum', keepneg=False)
(Constructor)

source code 

Create a spectrum from arrays.

Parameters:
  • wave - Wavelength array
  • flux - Flux array
  • waveunits (units.WaveUnits or subclass) - Units of wave
  • fluxunits (units.FluxUnits or subclass) - Units of flux
  • name (string) - Description of this array
  • keepneg (bool) - If true, negative flux values will be retained; by default, they are forced to zero
  • wave,flux (Numpy array with numerical data)
Overrides: object.__init__