PyNeb
1.1.2
PyNeb Reference Manua
|
Functions | |
def | between (array, limits) |
def | ipRead |
def | masterListInfo |
def | masterListRead () |
def | photoxRead (ions) |
def | ionrecdatRead (filename) |
def | z2element (z) |
def | zion2name |
def | zion2filename |
def | zion2localFilename |
def | zion2spectroscopic |
def | convertName (name) |
def | defaultsRead |
def | ion2filename (ions) |
def | el2z (els) |
def | abundanceRead |
def | qrp (z, u) |
def | elvlcRead |
def | elvlcWrite (info) |
def | wgfaRead |
def | wgfaWrite |
def | easplomRead |
def | splomDescale (splom, energy) |
def | splomRead |
def | splupsRead |
def | cireclvlRead |
def | dilute (radius) |
def | diRead |
def | eaCross |
def | eaRead |
def | rrRead (ions) |
def | drRead (ions) |
def | ioneqRead |
def | gffRead () |
def | gffintRead () |
def | itohRead () |
def | klgfbRead () |
def | listFiles (path) |
def | fblvlRead |
def | vernerRead () |
def | twophotonHRead () |
def | twophotonHeRead () |
def | upsdatRead (upsdatFileName) |
def | versionRead () |
def | scale_bti (evin, crossin, f, ev1) |
def | descale_bti (bte, btx, f, ev1) |
def | descale_bt (bte, btomega, f, ev1) |
def | scale_bt (evin, omega, f, ev1) |
Utility functions, many for reading the CHIANTI database files. Copyright 2009, 2010 Kenneth P. Dere This software is distributed under the terms of the GNU General Public License that is found in the LICENSE file
def pyneb.utils._chianti_tools.abundanceRead | ( | abundancename = '' | ) |
read an abundanc file and returns the abundance values relative to hydrogen
def pyneb.utils._chianti_tools.between | ( | array, | |
limits | |||
) |
returns an index array of elements of array where the values lie between the limits given as a 2 element list or tuple
def pyneb.utils._chianti_tools.cireclvlRead | ( | ions, | |
filename = 0 , |
|||
cilvl = 0 , |
|||
reclvl = 0 , |
|||
rrlvl = 0 |
|||
) |
to read Chianti cilvl and reclvl files and return data must specify type as either cilvl, reclvl or rrlvl
def pyneb.utils._chianti_tools.convertName | ( | name | ) |
convert ion name string to Z and Ion
def pyneb.utils._chianti_tools.defaultsRead | ( | verbose = 0 | ) |
def pyneb.utils._chianti_tools.descale_bt | ( | bte, | |
btomega, | |||
f, | |||
ev1 | |||
) |
descale BT excitation scaling returns [energy,collision strength]
def pyneb.utils._chianti_tools.descale_bti | ( | bte, | |
btx, | |||
f, | |||
ev1 | |||
) |
descale BT ionization scaling returns [energy,cross-section]
def pyneb.utils._chianti_tools.dilute | ( | radius | ) |
to calculate the dilution factor as a function distance from the center of a star in units of the stellar radius a radius of less than 1.0 (incorrect) results in a dilution factor of 0.
def pyneb.utils._chianti_tools.diRead | ( | ions, | |
filename = 0 |
|||
) |
read chianti direct ionization .params files and return {"info":info,"btf":btf,"ev1":ev1,"xsplom":xsplom,"ysplom":ysplom,"ref":hdr} info={"iz":iz,"ion":ion,"nspl":nspl,"neaev":neaev}
def pyneb.utils._chianti_tools.drRead | ( | ions | ) |
read chianti dielectronic recombination .drparams files and return {'rrtype','params','ref'}
def pyneb.utils._chianti_tools.eaCross | ( | diparams, | |
easplom, | |||
elvlc, | |||
energy = None , |
|||
verbose = False |
|||
) |
Provide the excitation-autoionization cross section. Energy is given in eV.
def pyneb.utils._chianti_tools.eaRead | ( | ions, | |
filename = 0 |
|||
) |
read a chianti excitation-autoionization file and return the EA ionization rate data derived from splupsRead {"lvl1":lvl1,"lvl2":lvl2,"ttype":ttype,"gf":gf,"de":de,"cups":cups,"bsplups":bsplups,"ref":ref}
def pyneb.utils._chianti_tools.easplomRead | ( | ions, | |
extension = '.splom' |
|||
) |
read chianti splom files and returns {"lvl1":lvl1,"lvl2":lvl2,"deryd":de,"gf":gf,"eryd":eout,"omega":omout} currently only works for 5 point spline fit files
def pyneb.utils._chianti_tools.el2z | ( | els | ) |
from an the name of the element (1-2 letter) return Z
def pyneb.utils._chianti_tools.elvlcRead | ( | ions, | |
filename = None , |
|||
verbose = 0 , |
|||
useTh = 1 |
|||
) |
read a chianti energy level file and returns {"lvl":lvl,"conf":conf,"term":term,"spin":spin,"l":l,"spd":spd,"j":j ,"mult":mult,"ecm":ecm,"eryd":eryd,"ecmth":ecmth,"erydth":erydth,"ref":ref,"pretty":pretty, 'ionS':ions} if a energy value for ecm or eryd is zero(=unknown), the theoretical values (ecmth and erydth) are inserted
def pyneb.utils._chianti_tools.elvlcWrite | ( | info | ) |
creates a .elvlc in the current directory info is a dictionary that must contain the following keys ionS, the Chianti style name of the ion such as c_4 conf, an integer denoting the configuration - not too essential term, a string showing the configuration spin, an integer of the spin of the state in LS coupling l, an integer of the angular momentum quantum number spd, an string for the alphabetic symbol of the angular momemtum, S, P, D, etc j, a floating point number, the total angular momentum ecm, the observed energy in inverse cm, if unknown, the value is 0. eryd, the observed energy in Rydbergs, if unknown, the value is 0. ecmth, the calculated energy from the scattering calculation, in inverse cm erydth, the calculated energy from the scattering calculation in Rydbergs ref, the references in the literature to the data in the input info
def pyneb.utils._chianti_tools.fblvlRead | ( | filename, | |
verbose = False |
|||
) |
read a chianti energy level file and returns {"lvl":lvl,"conf":conf,"term":term,"spin":spin,"l":l,"spd":spd,"j":j ,"mult":mult,"ecm":ecm,"eryd":eryd,"ref":ref}
def pyneb.utils._chianti_tools.gffintRead | ( | ) |
to read the integrated free-free gaunt factors of Sutherland, 1998, MNRAS, 300, 321.
def pyneb.utils._chianti_tools.gffRead | ( | ) |
to read the free-free gaunt factors of Sutherland, 1998, MNRAS, 300, 321. this function reads the file and reverses the values of g2 and u
def pyneb.utils._chianti_tools.ion2filename | ( | ions | ) |
convert ion string to generic file name string
def pyneb.utils._chianti_tools.ioneqRead | ( | ioneqname = '' , |
|
verbose = 0 |
|||
) |
reads an ioneq file and stores temperatures and ionization equilibrium values in self.IoneqTemperature and self.Ioneq and returns a dictionary containing these value and the reference to the literature
def pyneb.utils._chianti_tools.ionrecdatRead | ( | filename | ) |
read chianti ionxdat, ionizdat, recombdat files and return {"ev":ev,"cross":cross,"crosserr":crosserr,"ref":ref} not tested
def pyneb.utils._chianti_tools.ipRead | ( | verbose = False | ) |
reads the ionization potential file, returns ip array in eV
def pyneb.utils._chianti_tools.itohRead | ( | ) |
to read in the free-free gaunt factors of Itoh et al. (ApJS 128, 125, 2000)
def pyneb.utils._chianti_tools.klgfbRead | ( | ) |
to read CHIANTI files file containing the free-bound gaunt factors for n=1-6 from Karzas and Latter, 1961, ApJSS, 6, 167 returns {pe, klgfb}, the photon energy and the free-bound gaunt factors
def pyneb.utils._chianti_tools.listFiles | ( | path | ) |
walks the path and subdirectories to return a list of files
def pyneb.utils._chianti_tools.masterListInfo | ( | force = 0 | ) |
returns information about ions in masterlist the reason for this file is to speed up multi-ion spectral calculations the information is stored in a pickled file 'masterlist_ions.pkl' if the file is not found, one will be created and the following information returned for each ion wmin, wmax : the minimum and maximum wavelengths in the wgfa file tmin, tmax : the minimum and maximum temperatures for which the ionization balance is nonzero
def pyneb.utils._chianti_tools.masterListRead | ( | ) |
read a chianti masterlist file and return a list of files
def pyneb.utils._chianti_tools.photoxRead | ( | ions | ) |
read chianti photoionization .photox files and return {"energy", "cross"} where energy is in Rydbergs and the cross section is in cm^2
def pyneb.utils._chianti_tools.qrp | ( | z, | |
u | |||
) |
qrp(Z,u) u = E/IP calculate Qr-prime (equ. 2.12) of Fontes, Sampson and Zhang 1999
def pyneb.utils._chianti_tools.rrRead | ( | ions | ) |
read chianti radiative recombination .rrparams files and return {'rrtype','params','ref'}
def pyneb.utils._chianti_tools.scale_bt | ( | evin, | |
omega, | |||
f, | |||
ev1 | |||
) |
apply BT excitation scaling to (energy, collision strength) returns [bte,btomega]
def pyneb.utils._chianti_tools.scale_bti | ( | evin, | |
crossin, | |||
f, | |||
ev1 | |||
) |
apply BT ionization scaling to (energy, cross-section) returns [bte,btx]
def pyneb.utils._chianti_tools.splomDescale | ( | splom, | |
energy | |||
) |
Calculates the collision strength for excitation-autoionization as a function of energy. energy in eV
def pyneb.utils._chianti_tools.splomRead | ( | ions, | |
ea = 0 , |
|||
filename = None |
|||
) |
read chianti .splom files and return {"lvl1":lvl1,"lvl2":lvl2,"ttype":ttype,"gf":gf,"deryd":de,"c":c,"splom":splomout,"ref":hdr} not tested
def pyneb.utils._chianti_tools.splupsRead | ( | ions, | |
filename = 0 , |
|||
prot = 0 , |
|||
ci = 0 , |
|||
diel = 0 |
|||
) |
read a chianti splups file and return {"lvl1":lvl1,"lvl2":lvl2,"ttype":ttype,"gf":gf,"de":de,"cups":cups,"bsplups":bsplups,"ref":ref} if prot >0, then reads the psplups file if ci > 0, then reads cisplups file if diel > 0, then reads dielsplups file
def pyneb.utils._chianti_tools.twophotonHeRead | ( | ) |
to read the two-photon A values and distribution function for the He seq
def pyneb.utils._chianti_tools.twophotonHRead | ( | ) |
to read the two-photon A values and distribution function for the H seq
def pyneb.utils._chianti_tools.upsdatRead | ( | upsdatFileName | ) |
to read the standard Chianti upsdat file
def pyneb.utils._chianti_tools.vernerRead | ( | ) |
Reads the Verner & Yakovlev (A&AS 109, 125, 1995) photoionization cross-section data
def pyneb.utils._chianti_tools.versionRead | ( | ) |
read the version number of the CHIANTI database
def pyneb.utils._chianti_tools.wgfaRead | ( | ions, | |
filename = 0 , |
|||
elvlcname = 0 , |
|||
total = 0 |
|||
) |
reads chianti wgfa file and returns {"lvl1":lvl1,"lvl2":lvl2,"wvl":wvl,"gf":gf,"avalue":avalue,"ref":ref} if elvlcname is specified, the lsj term labels are returned as 'pretty1' and 'pretty2'
def pyneb.utils._chianti_tools.wgfaWrite | ( | info, | |
outfile = 0 , |
|||
minBranch = 0. |
|||
) |
to write a wgfa file info is a dictionary the contains the following elements ionS, the Chianti style name of the ion such as c_4 for C IV lvl1 - the lower level, the ground level is 1 lvl2 - the upper level wvl - the wavelength in Angstroms gf - the weighted oscillator strength avalue - the A value pretty1 - descriptive text of the lower level (optional) pretty2 - descriptive text of the upper level (optiona) ref - reference text, a list of strings minBranch: the transition must have a branching ratio greater than the specified to be written to the file
def pyneb.utils._chianti_tools.z2element | ( | z | ) |
convert Z to element string
def pyneb.utils._chianti_tools.zion2filename | ( | z, | |
ion, | |||
dielectronic = False |
|||
) |
convert Z to generic file name string
def pyneb.utils._chianti_tools.zion2localFilename | ( | z, | |
ion, | |||
dielectronic = False |
|||
) |
convert Z to generic file name string with current directory at top
def pyneb.utils._chianti_tools.zion2name | ( | z, | |
ion, | |||
dielectronic = False |
|||
) |
convert Z, ion to generic name 26, 13 -> fe_13
def pyneb.utils._chianti_tools.zion2spectroscopic | ( | z, | |
ion, | |||
dielectronic = False |
|||
) |
convert Z and ion to spectroscopic notation string