PyNeb  1.1.2
PyNeb Reference Manua
pyneb.core.pynebcore Namespace Reference

Classes

class  _AtomDataAscii
 
class  _AtomDataFits
 
class  _AtomDataNone
 
class  _AtomDataStout
 
class  _CollDataAscii
 
class  _CollDataFits
 
class  _CollDataNone
 
class  _CollDataStout
 
class  Atom
 
class  EmissionLine
 
class  Observation
 
class  RecAtom
 

Functions

def profile (f)
 
def getRecEmissivity
 
def getHbEmissivity
 
def getAtomDict (atom_list=None, elem_list=None, spec_list=None, only_coll=False, kwargs)
 
def getLineLabel
 
def parseLineLabel (lineLabel)
 
def isValid (line_label)
 

Variables

 profiler = None
 

Detailed Description

@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

Function Documentation

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.getHbEmissivity (   tem = -1)
Compute Hbeta emissivity in erg/s/(N(H+)*N(e-)) for a given temperature with the formula 
    by Aller (1984)

Usage:
    getHbemissivity(tem=10000)

Parameters:
    - tem     electronic temperature in K
def pyneb.core.pynebcore.getLineLabel (   elem,
  spec,
  wave,
  blend = False 
)
Build a line label in the standard PyNeb format. Return atom_label, wave_label, and line_label 
        (strings representing the atom and wave fragments of the line label and the 
            complete line label)

Parameters:
    - elem      symbol of the selected element
    - spec      ionization stage in spectroscopic notation (I = 1, II = 2, etc.)
    - wave      wavelength of the line
    - blend     blend flag (default = False)

@see parseLineLabel
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.isValid (   line_label)
Return True if the line label correspond to a valid line from LINE_LABEL_LIST or BLEND_LIST

Usage:
    isValid('O3_5007A')

Parameters:
    - line_label    label to be tested
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 
def profile (   f)

Variable Documentation

profiler = None