Package chianti :: Package core :: Module Ion :: Class ion
[hide private]
[frames] | no frames]

Class ion

source code

  _IonTrails._ionTrails --+
                          |
_SpecTrails._specTrails --+
                          |
                         ion
Known Subclasses:

The top level class for performing spectral calculations for an ion in the CHIANTI database.

ionStr is a string corresponding such as 'c_5' that corresponds to the C V ion. temperature in Kelvin eDensity in cm^-3 radTemperature, the radiation black-body temperature in Kelvin rPlot, the distance from the center of the star in stellar radii

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

Instance Methods [hide private]
 
__init__(self, ionStr, temperature=None, eDensity=None, pDensity='default', radTemperature=0, rStar=0, abundanceName=0, abundance=0, verbose=0, setup=True, em=0)
The top level class for performing spectral calculations for an ion in the CHIANTI database.
source code
 
boundBoundLoss(self, wvlRange=None, allLines=1)
Calculate the summed radiative loss rate for all lines of the specified ion.
source code
 
cireclvlDescale(self, lvlType)
Interpolate and extrapolate cilvl and reclvl rates.
source code
 
diCross(self, energy=None, verbose=False)
Calculate the direct ionization cross section.
source code
 
diRate(self)
Calculate the direct ionization rate coefficient as a function of temperature (K)
source code
 
drRate(self)
Provide the dielectronic recombination rate coefficient as a function of temperature (K).
source code
 
drRateLvl(self, verbose=0)
to calculate the level resolved dielectronic rate from the higher ionization stage to the ion of interest rates are determined from autoionizing A-values the dictionary self.DrRateLvl contains rate = the dielectronic rate into an autoionizing level effRate = the dielectronic rate into an autoionizing level mutilplied by the branching ratio for a stabilizing transition totalRate = the sum of all the effRates
source code
 
eaCross(self, energy=0, verbose=False)
Provide the excitation-autoionization cross section.
source code
 
eaDescale(self)
Calculates the effective collision strengths (upsilon) for excitation-autoionization as a function of temperature.
source code
 
eaRate(self)
Calculate the excitation-autoionization rate coefficient.
source code
 
emiss(self, wvlRange=0, allLines=1)
Calculate the emissivities for lines of the specified ion.
source code
 
emissList(self, index=-1, wvlRange=None, wvlRanges=None, top=10, relative=0, outFile=0)
List the emissivities.
source code
 
emissPlot(self, index=-1, wvlRange=None, top=10, linLog='lin', relative=0, verbose=0, plotFile=0, saveFile=0)
Plot the emissivities.
source code
 
emissRatio(self, wvlRange=None, wvlRanges=None, top=10)
Plot the ratio of 2 lines or sums of lines.
source code
 
gofnt(self, wvlRange=0, top=10, verbose=0)
Calculate the 'so-called' G(T) function.
source code
 
intensity(self, wvlRange=None, allLines=1, em=0)
Calculate the intensities for lines of the specified ion.
source code
 
intensityRatioInterpolate(self, data, scale='lin', plot=0, verbose=0)
to take a set of date and interpolate against the IntensityRatio the scale can be one of 'lin'/'linear' [default], 'loglog', 'logx', 'logy',
source code
 
ioneqOne(self)
Provide the ionization equilibrium for the selected ion as a function of temperature.
source code
 
ionizCross(self, energy=0)
Provides the total ionization cross section.
source code
 
ionizRate(self)
Provides the total ionization rate.
source code
 
p2eRatio(self)
Calculates the proton density to electron density ratio.
source code
 
popPlot(self, top=10, plotFile=0, outFile=0, pub=0)
Plots populations vs temperature or eDensity.
source code
 
populate(self, popCorrect=1, verbose=0, **kwargs)
Calculate level populations for specified ion.
source code
 
recombRate(self)
Provides the total recombination rate coefficient.
source code
 
rrRate(self)
Provide the radiative recombination rate coefficient as a function of temperature (K).
source code
 
setup(self, dir=0, verbose=0)
if ion is initiated with setup=0, this allows the setup to be done at a later point perhaps, more importantly, by setting dir to a directory cotaining the necessary files for a ChiantiPy ion, it allows one to setup an ion with files not in the current Chianti directory
source code
 
setupIonrec(self, dir=0, verbose=0)
this allows a bare-bones ion object to be setup up with just the ionization and recombination rates mainly for ions without a complete set of files - one that is not in the MasterList
source code
 
spectrum(self, wavelength, filter=(<function gaussianR at 0x7fe03427d8c0>, 1000.0), label=0, allLines=1, em=0)
Calculates the line emission spectrum for the specified ion.
source code
 
twoPhoton(self, wvl, em=0)
to calculate the two-photon continuum - only for hydrogen- and helium-like ions includes the elemental abundance and the ionization equilibrium includes the emission measure if specified
source code
 
twoPhotonEmiss(self, wvl)
to calculate the two-photon continuum rate coefficient - only for hydrogen- and helium-like ions
source code
 
twoPhotonLoss(self)
to calculate the two-photon energy loss rate - only for hydrogen- and helium-like ions includes the elemental abundance and the ionization equilibrium does not include the emission measure
source code
 
upsilonDescale(self, prot=0, diel=0)
Provides the temperatures and effective collision strengths (upsilons) set prot for proton rates otherwise, ce will be set for electron collision rates uses the new format "scups" files
source code
 
upsilonDescaleSplups(self, prot=0, diel=0)
Provides the temperatures and effective collision strengths (upsilons) set prot for proton rates otherwise, ce will be set for electron collision rates
source code

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

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

Method Details [hide private]

__init__(self, ionStr, temperature=None, eDensity=None, pDensity='default', radTemperature=0, rStar=0, abundanceName=0, abundance=0, verbose=0, setup=True, em=0)
(Constructor)

source code 

The top level class for performing spectral calculations for an ion in the CHIANTI database.

ionStr is a string corresponding such as 'c_5' that corresponds to the C V ion. temperature in Kelvin eDensity in cm^-3 radTemperature, the radiation black-body temperature in Kelvin rStar, the distance from the center of the star in stellar radii

the elemental abundance values can be set to one of the names in the XUVTOP/abundance directory without the '.abund' suffix, such as abundanceName = 'sun_photospheric_1998_grevesse'

Overrides: _SpecTrails._specTrails.__init__

boundBoundLoss(self, wvlRange=None, allLines=1)

source code 

Calculate the summed radiative loss rate for all lines of the specified ion.

wvlRange, a 2 element tuple, list or array determines the wavelength range

units: ergs cm^-3 s^-1

includes elemental abundance and ionization fraction.

cireclvlDescale(self, lvlType)

source code 

Interpolate and extrapolate cilvl and reclvl rates. lvltype must be either 'reclvl', 'cilvl' or 'rrlvl' Used in level population calculations.

diCross(self, energy=None, verbose=False)

source code 

Calculate the direct ionization cross section.

Given as a function of the incident electron energy in eV, puts values into DiCross

eaCross(self, energy=0, verbose=False)

source code 

Provide the excitation-autoionization cross section.

Energy is given in eV.

emiss(self, wvlRange=0, allLines=1)

source code 

Calculate the emissivities for lines of the specified ion.

wvlRange can be set to limit the calculation to a particular wavelength range

units: ergs cm^-3 s^-1 str^-1

Does not include elemental abundance or ionization fraction

Wavelengths are sorted set allLines = 1 to include unidentified lines

emissList(self, index=-1, wvlRange=None, wvlRanges=None, top=10, relative=0, outFile=0)

source code 

List the emissivities.

wvlRange, a 2 element tuple, list or array determines the wavelength range

Top specifies to plot only the top strongest lines, default = 10

normalize = 1 specifies whether to normalize to strongest line, default = 0

emissPlot(self, index=-1, wvlRange=None, top=10, linLog='lin', relative=0, verbose=0, plotFile=0, saveFile=0)

source code 

Plot the emissivities.

wvlRange, a 2 element tuple, list or array determines the wavelength range

Top specifies to plot only the top strongest lines, default = 10

linLog specifies a linear or log plot, want either lin or log, default = lin

normalize = 1 specifies whether to normalize to strongest line, default = 0

emissRatio(self, wvlRange=None, wvlRanges=None, top=10)

source code 

Plot the ratio of 2 lines or sums of lines. Shown as a function of density and/or temperature. For a single wavelength range, set wvlRange = [wMin, wMax] For multiple wavelength ranges, set wvlRanges = [[wMin1,wMax1],[wMin2,wMax2], ...] A plot of relative emissivities is shown and then a dialog appears for the user to choose a set of lines.

gofnt(self, wvlRange=0, top=10, verbose=0)

source code 

Calculate the 'so-called' G(T) function.

Given as a function of both temperature and eDensity.

Only the top( set by 'top') brightest lines are plotted. the G(T) function is returned in a dictionary self.Gofnt

intensity(self, wvlRange=None, allLines=1, em=0)

source code 

Calculate the intensities for lines of the specified ion.

wvlRange, a 2 element tuple, list or array determines the wavelength range

units: ergs cm^-3 s^-1 str^-1

includes elemental abundance and ionization fraction.

the emission measure 'em' is included if specified

ioneqOne(self)

source code 

Provide the ionization equilibrium for the selected ion as a function of temperature. returned in self.IoneqOne

ionizCross(self, energy=0)

source code 

Provides the total ionization cross section.

uses diCross and eaCross.

ionizRate(self)

source code 

Provides the total ionization rate.

Calls diRate and eaRate.

p2eRatio(self)

source code 

Calculates the proton density to electron density ratio.

Uses the abundance and ionization equilibrium.

popPlot(self, top=10, plotFile=0, outFile=0, pub=0)

source code 

Plots populations vs temperature or eDensity.

top specifies the number of the most highly populated levels to plot if pub is set, the want publication plots (bw, lw=2).

populate(self, popCorrect=1, verbose=0, **kwargs)

source code 

Calculate level populations for specified ion. possible keyword arguments include temperature, eDensity, pDensity, radTemperature and rStar

recombRate(self)

source code 

Provides the total recombination rate coefficient.

Calls drRate and rrRate

spectrum(self, wavelength, filter=(<function gaussianR at 0x7fe03427d8c0>, 1000.0), label=0, allLines=1, em=0)

source code 

Calculates the line emission spectrum for the specified ion.

Convolves the results of intensity to make them look like an observed spectrum the default filter is the gaussianR filter with a resolving power of 1000. Other choices include chianti.filters.box and chianti.filters.gaussian. When using the box filter, the width should equal the wavelength interval to keep the units of the continuum and line spectrum the same.

includes ionization equilibrium and elemental abundances

can be called multiple times to use different filters and widths uses label to keep the separate applications of spectrum sorted by the label for example, do .spectrum( .... labe='test1') and do .spectrum( .... label = 'test2') then will get self.Spectrum.keys() = test1, test2 and self.Spectrum['test1'] = {'intensity':aspectrum, 'wvl':wavelength, 'filter':useFilter.__name__, 'filterWidth':useFactor}

Note: scipy.ndimage.filters also includes a range of filters.