chiantipy

Tutorial

The ion class, basic properties

Bring up a Python session, or better yet, an IPython session

import chianti.core as ch
fe14 = ch.ion('fe_14')

The fe14 object is instantiated with a number of methods and data. Methods start with a lowercase letter and data start with uppercase. It is best not to simply import ion as there is a method with the same name in matplotlib. A few examples:

fe14.Ip
  >> 392.16196

this is the ionization potential in electron volts.

fe14.Abundance
  >> 0.00012589265

this is the abundance of iron relative to hydrogen for the default elemental abundance set. The specified defaults can be examined by

fe14.Defaults
  >>  {'abundfile': 'sun_coronal', 'flux': 'energy', 'ioneqfile': 'chianti', 'wavelength': 'angstrom'}

the defaults can be specified by the user, but this will be discussed later.

fe14.Spectroscopic
>>  'Fe XIV'
fe14.Elvlc.keys()
>>  ['ecmth', 'term', 'ref', 'pretty', 'spd', 'ecm', 'j', 'l', 'erydth', 'conf', 'lvl', 'spin', 'eryd', 'mult']

fe14.Elvlc is a dictionary that describes the energy levels of the Fe XIV ion. The key ‘ecm’ provides the energies, relative to the ground level, in inverse cm. The ‘ref’ key provides the references in the scientific literature where the data were provided.

fe14.Elvlc['ref']
>> ['%filename: fe_14.elvlc',
      %observed energy levels: Churilov S.S., Levashov V.E., 1993, Physica Scripta 48, 425,
      %observed energy levels: Redfors A., Litzen U., 1989, J.Opt.Soc.Am.B 6, #8, 1447,
      %theoretical energy levels: Storey P.J., Mason H.E., Young P.R., 2000, A&ASS 141, 28,
      %comment,
      Only level 16 does not have an observed energy. I have placed in,
      the third energy column a recommended value for the energy value of,
      this level, based on the theoretical and observed splittings of the,
      4F levels. It is this energy value which is used to compute the,
      wavelengths of transitions involving level 16 given in the .wgfa,
      file.,
      %produced as part of the Arcetri/Cambridge/GMU/NRL 'CHIANTI' atomic data base collaboration,
      %,
      %   P.R.Young Feb 99']
fe14.Population.keys()
>>['ci', 'protonDensity', 'popmat', 'eDensity', 'rec', 'population', 'temperature']

fe14.Population['population'].shape
>>(21, 739)

'%10.2e'%(fe14.Temperature[10])
>> '  2.00e+06'

fe14.Population['population'][10,:5]
>>array([  8.63535029e-01, 1.35791626e-01, 8.33350082e-09, 8.19101370e-08, 2.32292956e-08])

give the population of the first 5 of 739 levels of Fe XIV at a temperature of 2.00e+6

to be continued

Table Of Contents

Previous topic

Quick Start

Next topic

Notes

This Page

Get ChiantiPy at SourceForge.net. Fast, secure and Free Open Source software downloads