@module pynebcore
Main PyNeb module
Tools to manage atoms, emission lines and observational data.
@class Atom atom object
@class EmissionLine emission line object
@class Observation observation object
def pyneb.core.pynebcore.getAtomDict |
( |
|
atom_list = None , |
|
|
|
elem_list = None , |
|
|
|
spec_list = None , |
|
|
|
only_coll = False , |
|
|
|
kwargs |
|
) |
| |
Initializes all atoms, according to the atomic files available.
The elem objects are given conventional names elem+spec (e.g., O III is O3)
Usage:
all = pn.getAtomDict()
print(all['S2'].name)
some = pn.getAtomDict(elem_list=['C', 'N', 'O'])
some = pn.getAtomDict(atom_list=['O2', 'O3', 'Ar3'])
Parameters:
- atom_list a list of the ions for which the elem is to be computed
Takes precedence on elem_list and spec_list
- elem_list a list of all the elements for which the elem is to be computed (all by default)
- spec_list a list of the spectra for which the elem is to be computed (all by default)
- only_coll if True, ionly Atom are sent back,. Otherwise (default), Atom and RecAtom are sent back
_ **kwargs argumentas passed to Atom, e.g. OmegaInterp
def pyneb.core.pynebcore.getRecEmissivity |
( |
|
tem, |
|
|
|
den, |
|
|
|
lev_i = None , |
|
|
|
lev_j = None , |
|
|
|
atom = 'H1' , |
|
|
|
method = 'linear' , |
|
|
|
wave = None , |
|
|
|
product = True |
|
) |
| |
The function instantiates a RecAtom and store it into atomicData._RecombData for a further use.
More possibilities are obtained using the RecAtom class.
Usage:
print(getRecEmissivity(1e4, 1e3, 3, 2, atom='H1') / getRecEmissivity(1e4, 1e3, 4, 2, atom='H1'))
# return Ha/Hb
Parameters:
- tem temperature in K
- den density in cm-3
- lev_i, lev_j levels (lev_i>lev_j, i_min=1)
- atom atom (e.g. 'H1', 'He1')
- method interpolation method ('linear', 'nearest', 'cubic'), sent to scipy.interpolate.griddata
- wave alternative way of identifying emision line.
def pyneb.core.pynebcore.parseLineLabel |
( |
|
lineLabel | ) |
|
Parse the line label to extract the substrings referring to the atom (elem, spec and atom)
and the numerical value of the wave
Parameters:
- label line label in the standard PyNeb format
Returns:
- elem, spec, atom_label, wave, wave_label, blend strings containing the elem, spec, atom and
wave; numerical value of the wave,
in Angstrom; and blend flag