PyNeb  1.1.2
PyNeb Reference Manua
RecAtom Class Reference

Inherits object.

Public Member Functions

def __init__
 
def initWaves (self)
 
def getWave
 
def getTotRecombination
 
def getTransition
 
def printTransition (self, wave)
 
def printSources (self)
 
def getSources (self)
 
def getEnergy
 
def getEmissivity
 
def getIonAbundance
 
def __repr__ (self)
 

Public Attributes

 log_
 
 type
 
 is_valid
 
 gs
 
 case
 
 sources
 
 atom
 
 elem
 
 spec
 
 name
 
 calling
 
 Z
 
 IP
 
 recFitsFile
 
 useNIST
 
 E_in_vacuum
 
 comments
 
 NIST
 
 NLevels
 
 wave_Ang
 
 recFitsFullPath
 
 temp
 
 log_dens
 
 labels
 
 label_type
 
 TotRecFile
 
 alpha_grid
 
 lg_tem_grid
 

Constructor & Destructor Documentation

def __init__ (   self,
  elem = None,
  spec = None,
  atom = None,
  case = 'B' 
)
RecAtom class. Used to manage recombination data and compute emissivities.

Usage:
    H1 = pn.RecAtom('H', 1)

Parameters:
    - elem          symbol of the selected element
    - spec          ionization stage in spectroscopic notation (I = 1, II = 2, etc.)

Member Function Documentation

def __repr__ (   self)
def getEmissivity (   self,
  tem,
  den,
  lev_i = None,
  lev_j = None,
  wave = None,
  label = None,
  method = 'linear',
  product = True 
)
Return the emissivity of a recombination line. The arguments used to 
define the line depend on whether the atom is an hydrogenoid or not. 
In the first case, the transition can be specified either as a pair 
of levels lev_i, lev_j or as a label. 
In the second case, the transition can be specified either as a wavelength 
or as a label.
In either case, enter <atom>.labels to display the valid labels.

Usage:
    H1 = pn.RecAtom('H', 1)
    H1.getEmissivity([1e4, 1.2e4], [1e3, 1e2], lev_i = 4, lev_j = 2)
    H1.getEmissivity([1e4, 1.2e4], [1e3, 1e2], label='4_2', product=False)
    tem = np.linspace(5000, 20000, 100)
    den = np.logspace(2, 6, 100)
    imHab = H1.getEmissivity(tem, den, label='3_2') / H1.getEmissivity(tem, den, label='4_2')

    He1 = pn.RecAtom('He', 1)
    He1.getEmissivity(1e4, 1e2, wave=4471.0)
    He1.getEmissivity(1e4, 1e2, label='4471.0')
    
Parameters:
    - tem            temperature (K)
    - den            density (cm-3)
    - lev_i, lev_j   levels of the transition
    - wave           wavelength of the transition
    - label          label of the transition (e.g. "50_3", "1234.5")
    - method         interpolation method ('linear', 'nearest', 'cubic'), 
             sent to scipy.interpolate.griddata    
    - product        Boolean. If True (default), all the combination of (tem, den) are used. 
             If False, tem and den must have the same size and are joined.
def getEnergy (   self,
  level = -1,
  unit = '1/Ang' 
)
Return energy level of selected level (or array of energy levels, if level not given) 
    in Angstrom^-1 (default) or another unit

Usage:
    O3.getEnergy(4, unit='eV')
Parameters:
    - level  selected atomic level (default= -1, returns complete array)
    - unit   [str] one of '1/Ang' (default), 'eV', or 'Ryd'    
def getIonAbundance (   self,
  int_ratio,
  tem,
  den,
  lev_i = -1,
  lev_j = -1,
  wave = -1,
  label = None,
  to_eval = None,
  Hbeta = 100. 
)
Compute the ionic abundance relative to H+ given the temperature, the density and the 
    intensity of a line or sum of lines.
The arguments used to define the line depend on whether the atom is an hydrogenoid or not. 
For hydrogenoids, the transition can be specified either as a pair of levels 
    lev_i, lev_j, as a label, or as an I-type expression as the argument of to_eval 
    (e.g. to_eval='I(50, 19)' for the 50->19 transition). Wavelengths or L-type expressions 
    will not work in this case. 
For non-hydrogenoids, the transition can be specified either as an integer wavelength, 
    as a label, or as an A-type expression as the argument of to_eval (e.g. to_eval='A(4471)' 
    for the lambda=4471 transition). Note that all these alternatives imply that the wavelength
    is known. Pairs of levels and I or L-type expressions would not work.

The preferred method are the label and the I-type expressions, as the remaining parameters 
    are inherently fragile.

Usage:
    He2.getIonAbundance(130, 1.5e4, 100., lev_i=5, lev_j=4)
    He2.getIonAbundance(130, 1.5e4, 100., label="5_4")
    He2.getIonAbundance(130, 1.5e4, 100., to_eval='I(4,3) + I(4,2)')
    He1.getIonAbundance(100, 1.5e4, 100., wave=5016)
    He1.getIonAbundance(100, 1.5e4, 100., label="5016.0")
    He1.getIonAbundance(100, 1.5e4, 100., to_eval='S(5016)')
    He1.getIonAbundance(np.array([100, 150]), np.array([1.5e4, 1.2e4]), np.array([100., 120]), 
label="10830.0")
    
Parameters:
    - int_ratio    relative line intensity (default normalization: Hbeta = 100). 
            May be an array.
    - tem          electronic temperature in K. May be an array.
    - den          electronic density in cm^-3. May be an array.
    - lev_i        upper level of transition
    - lev_j        lower level of transition
    - wave         wavelength of transition. Takes precedence on lev_i and lev_j if set, 
            ignored otherwise 
    - to_eval      expression to be evaluated. Takes precedence on wave if set, 
            ignored otherwise.
    - Hbeta        line intensity normalization at Hbeta (default Hbeta = 100)
def getSources (   self)
def getTotRecombination (   self,
  tem,
  den,
  method = 'linear' 
)
Return the total recombination coefficient. The case (A or B) is set by selecting the corresponding trc file.

Usage:
    atomicData.setDataFile('h_i_trc_SH95-caseA.dat')
    h1.getTotRecombination(tem=10000, den=5.e3)
    
Parameters:
    - tem, den  temperature and density
    - method    interpolation method in the grid ('linear' = default, 'nearest', 'cubic')    
def getTransition (   self,
  wave,
  maxErrorA = 5.e-3,
  maxErrorm = 5.e-2 
)
Return the indexes (upper level, lower level) of a transition for a given atom 
    from the wavelength.

Usage:
    O3.getTransition(4959)
    
Parameters:
    - wave      wavelength in Angstrom (a float or a label: e.g., 5007, '5007A') 
or in micron (a label: '51.5m')
    - maxErrorA: tolerance if the input wavelength is in Angstrom
    - maxErrorm: tolerance if the input wavelength is in micron
def getWave (   self,
  lev_i = None,
  lev_j = None 
)
Return the wavelength of a transition given the levels

Usage:
    He2.getWave(4, 3) 
    
Parameters:
    - lev_i, lev_j: upper and lower levels of the transition
def initWaves (   self)
Initialization of wave_Ang
def printSources (   self)
def printTransition (   self,
  wave 
)
Print info on transition associated to input wavelength.

Usage:
    O3.printTransition(4959)
    
Parameters:
    - wave      wavelength in Angstrom (a float or a label: e.g., 5007, '5007A') 
or in micron (a label: '51.5m')

Member Data Documentation

alpha_grid
atom
calling
case
comments
E_in_vacuum
elem
gs
IP
is_valid
label_type
labels
lg_tem_grid
log_
log_dens
name
NIST
NLevels
recFitsFile
recFitsFullPath
sources
spec
temp
TotRecFile
type
useNIST
wave_Ang
Z