ChiantiPy Tools

ChiantiPy.tools.archival Module

Functions for reading pre-v8 CHIANTI files

Functions

elvlcRead(ions[, filename, verbose, useTh]) read a chianti energy level file and returns
elvlcWrite(info[, outfile, addLvl]) Write Chianti data to .elvlc file.
wgfaRead(ions[, filename, elvlcname, total, …]) Read CHIANTI data from a .wgfa file.

ChiantiPy.tools.filters Module

Line profile filters for creating synthetic spectra.

Functions

boxcar(wvl, wvl0[, factor]) Box-car filter
gaussian(wvl, wvl0[, factor]) A gaussian filter
gaussianR(wvl, wvl0[, factor]) A gaussian filter where the gaussian width is given by wvl0/factor.
lorentz(wvl, wvl0[, factor]) Lorentz profile filter with the exception that all factors are in wavelength units rather than frequency as the lorentz profile is usually defined.
moffat(wvl, wvl0[, factor]) Moffat profile with parameters suited to Chandra Letg spectra
voigt(wvl, wvl0[, factor]) pseudo-Voigt filter

ChiantiPy.tools.io Module

Reading and writing functions

Functions

abundanceRead([abundancename]) Read abundance file abundancename and return the abundance values relative to hydrogen
autoRead(ions[, filename, total, verbose]) Read CHIANTI autoionization rates from a .auto file.
autoWrite(info[, outfile, minBranch]) Write data to a CHIANTI .wgfa file
cireclvlRead(ions[, filename, filetype]) Read Chianti cilvl, reclvl, or rrlvl files and return data
convertName(name) Convert ion name string to Z and Ion
defaultsRead([verbose]) Read in configuration from .chiantirc file or set defaults if one is not found.
diRead(ions[, filename]) Read chianti direct ionization .params files and return data.
drRead(ions[, filename]) Read CHIANTI dielectronic recombination .drparams files
eaRead(ions[, filename]) Read a CHIANTI excitation-autoionization file and calculate the EA ionization rate data derived from splupsRead.
elvlcRead(ions[, filename, getExtended, …]) Reads the new format elvlc files.
elvlcWrite(info[, outfile, addLvl, …]) Write Chianti data to .elvlc file.
fblvlRead(filename[, verbose]) Read a Chianti energy level file
gffRead() Read the free-free gaunt factors of [R49].
gffintRead() Read the integrated free-free gaunt factors of [R50].
ioneqRead([ioneqname, verbose]) Reads an ioneq file
ipRead([verbose]) Reads the ionization potential file
itohRead() Read in the free-free gaunt factors of [R51].
klgfbRead() Read CHIANTI files containing the free-bound gaunt factors for n=1-6 from [R52].
masterListInfo([force, verbose]) Get information about ions in the CHIANTI masterlist.
masterListRead() Read a CHIANTI masterlist file.
photoxRead(ions) Read CHIANTI photoionization .photox files
rrRead(ions[, filename]) Read CHIANTI radiative recombination .rrparams files
scupsRead(ions[, filename, verbose]) Read the new format v8 scups file containing the scaled temperature and upsilons from [R53].
splomRead(ions[, ea, filename]) Read chianti .splom files
splupsRead(ions[, filename, filetype]) Read a CHIANTI .splups file
trRead(ionS) read the files containing total recombination rates .trparams
twophotonHRead() Read the two-photon Einstein A values and distribution function for the H sequence.
twophotonHeRead() Read the two-photon Einstein A values and distribution function for the He sequence.
vernerRead() Reads the photoionization cross-section data from [R54].
versionRead() Read the version number of the CHIANTI database
wgfaRead(ions[, filename, elvlcname, total, …]) Read CHIANTI data from a .wgfa file.
wgfaWrite(info[, outfile, minBranch, …]) Write data to a CHIANTI .wgfa file
zion2name(z, ion[, dielectronic]) Convert Z and ion to generic name, e.g.

ChiantiPy.tools.mputil Module

Functions needed for standard Python multiprocessing module mspectrum

Functions

doFbQ(inQ, outQ) Multiprocessing helper for ChiantiPy.core.continuum.freeBound
doFfQ(inQ, outQ) Multiprocessing helper for ChiantiPy.core.continuum.freeFree
doIonQ(inQueue, outQueue) Multiprocessing helper for ChiantiPy.core.ion and ChiantiPy.core.ion.twoPhoton

ChiantiPy.tools.sources Module

Blackbody temperature calculations

Functions

blackbody(temperature, variable[, hnu]) Calculate the blackbody photon distribution as a function of energy (hnu = 1) or as a function of wavelength (hnu = 0) in units of \(\mathrm{photons}\,\mathrm{cm}^{-2}\,\mathrm{s}^{-1}\,\mathrm{str}^{-1}\,\mathrm{erg}^{-1}\)

Classes

blackStar(temperature, radius) Calculate blackbody radiation

ChiantiPy.tools.util Module

Utility functions

Notes

Some of these functions can be replaced by roman numeral and periodic table lookup libraries. some functions using os.walk can be replaced by os.path

Functions

between(array, limits) Find the indices of array corresponding to values in the range given by limits
convertName(name) Convert ion name string (e.g.
descale_bt(bte, btomega, f, ev1) Apply excitation descaling of [R55] to energy and collision strength
descale_bti(bte, btx, f, ev1) Apply ionization descaling of [R56] to energy and cross-section.
dilute(radius) Calculate the dilution factor.
el2z(els) Convert elemental symbol to atomic number
ion2filename(ions) Convert ion name string to generic directory-file name.
listFiles(path) Walks the path and subdirectories to return a list of files.
qrp(z, u) Calculate \(Q_R^{\prime}(Z,u)\), where \(u=\epsilon/I\) is the impact electron energy in threshold units, from Eq.
scale_bt(evin, omega, f, ev1) Apply excitation scaling of [R59] to energy and collision strength.
scale_bt_rate(inDict, ip[, f]) Apply ionization descaling of [R60], a Burgess-Tully type scaling to ionization rates and temperatures.
scale_bti(evin, crossin, f, ev1) Apply ionization scaling of [R61],[R62]_ to energy and cross-section.
scale_classical(inDict, ip) to apply the ‘classical’ scaling to the input data
spectroscopic2name(el, roman) Convert from spectroscopic notation, e.g.
splomDescale(splom, energy) Calculate the collision strength for excitation-autoionization as a function of energy.
z2element(z) Convert atomic number z to its elemental symbol.
zion2dir(z, ion[, dielectronic, xuvtop]) Convert atomic number and ion number to CHIANTI database directory.
zion2filename(z, ion[, dielectronic, xuvtop]) Convert atomic number and ion number to CHIANTI database filename.
zion2localFilename(z, ion[, dielectronic]) Convert atomic number and ion number to generic file name with current directory at top.
zion2name(z, ion[, dielectronic]) Convert atomic number and ion number to generic name, e.g.
zion2spectroscopic(z, ion[, dielectronic]) Convert atomic number and ion number to spectroscopic notation string