Package chianti :: Package core :: Module Spectrum :: Class spectrum
[hide private]
[frames] | no frames]

Class spectrum

source code

  _IonTrails._ionTrails --+
                          |
_SpecTrails._specTrails --+
                          |
                         spectrum

Calculate the emission spectrum as a function of temperature and density.

one of the convenient things is that all of the instantiated ion classes, determined through such keywords as 'elementList', 'ionList', and 'minAbund' are kept in a dictionary self.IonInstances where self.IonInstances['mg_7'] is the class instance of chianti.core.ion for 'mg_7'. All its methods and attributes are available.

includes elemental abundances and ionization equilibria

the set of abundances, a file in $XUVTOP/abundance, can be set with the keyword argument 'abundanceName'

temperature and density can be arrays but, unless the size of either is one (1), the two must have the same size

the returned spectrum will be convolved with a filter of the specified width on the specified wavelength array

the default filter is gaussianR with a resolving power of 1000. Other filters, such as gaussian, box and lorentz, are available in chianti.filters. When using the box filter, the width should equal the wavelength interval to keep the units of the continuum and line spectrum the same.

Inherited methods include 'intensityList', 'intensityRatio' (between lines of different ions), 'intensityRatioSave' and 'convolve'

A selection of elements can be make with elementList a list containing the names of elements that are desired to be included, e.g., ['fe','ni']

A selection of ions can be make with ionList containing the names of the desired lines in Chianti notation, i.e. C VI = c_6

Both elementList and ionList can not be specified at the same time

a minimum abundance can be specified so that the calculation can be speeded up by excluding elements with a low abundance. With solar photospheric abundances -

setting minAbund = 1.e-4 will include H, He, C, O, Ne setting minAbund = 2.e-5 adds N, Mg, Si, S, Fe setting minAbund = 1.e-6 adds Na, Al, Ar, Ca, Ni

Setting doContinuum =0 will skip the continuum calculation.

Setting em will multiply the spectrum at each temperature by the value of em.

em [for emission measure], can be a float or an array of the same length as the temperature/density

Instance Methods [hide private]
 
__init__(self, temperature, eDensity, wavelength, filter=(<function gaussianR at 0x7fe03427d8c0>, 1000.0), label=0, elementList=0, ionList=0, minAbund=0, doContinuum=1, em=0, keepIons=0, abundanceName=0, verbose=0, allLines=1) source code

Inherited from _IonTrails._ionTrails: intensityList, intensityPlot, intensityRatio, intensityRatioSave

Inherited from _SpecTrails._specTrails: convolve, ionGate, lineSpectrumPlot, spectrumPlot

Method Details [hide private]

__init__(self, temperature, eDensity, wavelength, filter=(<function gaussianR at 0x7fe03427d8c0>, 1000.0), label=0, elementList=0, ionList=0, minAbund=0, doContinuum=1, em=0, keepIons=0, abundanceName=0, verbose=0, allLines=1)
(Constructor)

source code 
Overrides: _SpecTrails._specTrails.__init__