pyCloudy  0.9.6
manage Cloudy photoionization code
CloudyModel Class Reference

Inherits object.

Public Member Functions

def __init__
 Cloudy model object. More...
 
def read_outputs (self, extension, delimiter='\t', comments=';', names=True, kwargs)
 
def zones (self)
 array of zones [int array] More...
 
def n_zones (self)
 number of zones [int] More...
 
def depth (self)
 depth [float array] (cm) More...
 
def thickness (self)
 thickness [float array] (cm) More...
 
def radius (self)
 radius [float array] (cm) More...
 
def dr (self)
 size of each zone [float array] (cm) More...
 
def drff (self)
 size of each zone taking into account filling factor [float array] (cm) More...
 
def dv (self)
 volume of each zone [float array] (cm^3) More...
 
def dvff (self)
 volume of each zone taking into account filling factor [float array] (cm^3) More...
 
def ne (self)
 electron density [float array] (cm^-3) More...
 
def nH (self)
 Hydrogen density [float array] (cm^-3) More...
 
def nenH (self)
 ne.nH [float array] (cm^-6) More...
 
def te (self)
 Electron temperature [float array] (K) More...
 
def tenenH (self)
 te.ne.nH float array More...
 
def ff (self)
 filling factor [float array] More...
 
def cool (self)
 cooling [float array] More...
 
def heat (self)
 heating [float array] More...
 
def rad_integ (self, a)
 rad_integ(a) = $\int a.ff.dr$ More...
 
def vol_integ (self, a)
 vol_integ(a) = $\int a.ff.dV$ More...
 
def vol_mean
 vol_mean(a, b) = $\frac{\int a.b.ff.dV}{\int b.ff.dV}$ More...
 
def rad_mean
 rad_mean(a, b) = $\frac{\int a.b.dr}{\int b.dr}$ More...
 
def log_U (self)
 log(U) in each zone [float array], with U(r) = $ Phi_0 * (r_0/r)^2/ (n_H.c)$ More...
 
def log_U_mean (self)
 log_U_mean = $\frac{\int U.dV}{\int dV}$ [float] More...
 
def log_U_mean_ne (self)
 log_U_mean_ne = $\frac{\int U.ne.nH.dV}{\int ne.nH.dV}$ [float] More...
 
def get_ionic (self, elem, ion)
 
def gtemp (self)
 
def gabund (self)
 
def gdgrat (self)
 
def gmass (self)
 
def get_T0_ion_vol
 get_T0_ion_vol(X, i) = $ \frac{\int T_e.n_H.ff.X^i/X.dV}{\int n_H.ff.X^i/X.dV}$ More...
 
def get_T0_ion_rad
 get_T0_ion_rad(X, i) = $ \frac{\int T_e.n_H.ff.X^i/X.dr}{\int n_H.ff.X^i/X.dr}$ More...
 
def get_ab_ion_vol
 get_ab_ion_vol(X, i) = $ \frac{\int X^i/X.n_H.ff.dr}{\int n_H.ff.dr}$ More...
 
def get_ab_ion_rad
 get_ab_ion_rad(X, i) = $\frac{\int X^i/X.n_H.ff.dr}{\int n_H.ff.dr}$ More...
 
def get_ne_ion_vol_ne
 get_ne_ion_vol_ne(X, i) = $\frac{\int ne.ne.nH.ff.Xi/X.dV}{\int ne.nH.ff.Xi/X.dV}$ More...
 
def get_T0_ion_vol_ne
 get_T0_ion_vol_ne(X, i) = $\frac{\int Te.ne.nH.ff.Xi/X.dV}{\int ne.nH.ff.X^i/X.dV}$ More...
 
def get_T0_ion_rad_ne
 get_T0_ion_rad_ne(X, i) = $\frac{\int Te.ne.nH.ff.Xi/X.dr}{\int ne.nH.ff.Xi/X.dr}$ More...
 
def get_ne_ion_rad_ne
 get_ne_ion_rad_ne(X, i) = $\frac{\int ne.ne.nH.ff.Xi/X.dr}{\int ne.nH.ff.Xi/X.dr}$ More...
 
def get_ab_ion_vol_ne
 get_ab_ion_vol_ne(X, i) = $\frac{\int Xi/X.n_e.n_H.ff.dV}{\int ne.nH.ff.dV}$ More...
 
def get_ab_ion_rad_ne
 get_ab_ion_rad_ne(X, i) = $\frac{\int Xi/X.n_e.n_H.ff.dr}{\int ne.nH.ff.dr}$ More...
 
def get_t2_ion_vol_ne
 get_t2_ion_vol_ne(X, i) = $\frac{\int (T_e-T_{X^i})^2.n_e.n_H.ff.X^i/X.dV}{T_{X^i}^2.\int ne.nH.ff.X^i/X.dV}$ More...
 
def get_t2_ion_rad_ne
 get_t2_ion_vol_ne(X, i) = $\frac{\int (T_e-T_{X^i})^2.n_e.n_H.ff.X^i/X.dr}{T_{X^i}^2.\int ne.nH.ff.X^i/X.dr}$ More...
 
def get_line (self, ref)
 
def get_emis (self, ref)
 return the emissivities(radius) of the given line array float More...
 
def get_emis_vol
 get_emis_vol(ref, [at_earth]) = $ \int \epsilon(ref).dV [/ 4.\pi.(distance)^2]$ More...
 
def get_emis_rad (self, ref)
 get_emis_rad(ref) = $ \int \epsilon(ref).dr$ More...
 
def get_T0_emis (self, ref)
 get_T0_emis(ref) = $\frac{\int T_e.\epsilon(ref).dV}{\int \epsilon(ref).dV}$ More...
 
def get_T0_emis_rad (self, ref)
 get_T0_emis_rad(ref) = $\frac{\int T_e.\epsilon(ref).dr}{\int \epsilon(ref).dr}$ More...
 
def get_ne_emis (self, ref)
 get_ne_emis(ref) = $\frac{\int n_e.\epsilon(ref).dV}{\int \epsilon(ref).dV}$ More...
 
def nH_mean (self)
 
def get_t2_emis (self, ref)
 get_t2_emis(ref) = $\frac{\int (T_e-T(ref))^2.\epsilon(ref).dV}{T(ref)^2\int \epsilon(ref).dV}$ More...
 
def get_cont_x
 Return the wavelength/energy/frequency array. More...
 
def get_cont_y
 Return the continuum flux (stellar or nebular, depending on cont parameter. More...
 
def get_G0
 get_G0 = integral(f_lambda . More...
 
def r_range (self)
 Boolean array defining the range used for the radial parameters (such as ne, ionic, integrals, etc) Defined by r_in_cut and r_out_cut. More...
 
def Hp_mass (self)
 Hp_mass = $ \int m_H.n_{H^+}.ff.dV$ [solar mass]. More...
 
def H0_mass (self)
 H0_mass = $ \int m_H.n_{H^0}.ff.dV$ [solar mass]. More...
 
def H_mass (self)
 H0_mass = $ \int m_H.n_H.ff.dV$ [solar mass]. More...
 
def Hbeta (self)
 Hbeta = $ \int Hbeta.n_H.ff.dV$ [solar mass]. More...
 
def T0 (self)
 Mean Temperature $T0=\frac{\int T_e.n_e.n_H.ff.dV}{\int n_e.n_H.ff.dV}$. More...
 
def t2 (self)
 t2 a la Peimbert $t^2=\frac{\int (T_e-T0)^2.n_e.n_H.ff.dV}{T0^2 \int n_e.n_H.ff.dV}$ More...
 
def get_Hb_SB (self)
 Hb_SB = I $_\beta / (Rout^2 * pi * 206265.^2)$. More...
 
def get_EW (self, label, lam0, lam_inf, lam_sup)
 
def get_EW2
 
def get_Hb_EW (self)
 Hb_EW = - $\lambda_\beta$ x I$_\beta^{line}$ / $\lambda.F_\beta^{cont}$. More...
 
def get_Ha_EW (self)
 Ha_EW = - $\lambda_\alpha$ x I$_\alpha^{line}$ / $\lambda.F_\alpha^{cont}$. More...
 
def is_valid_ion (self, elem, ion)
 is_valid_ion(elem, ion) return True if elem, ion is available in get_ionic. More...
 
def emis_from_pyneb
 
def add_emis_from_pyneb
 
def plot_spectrum (self, xunit='eV', cont='ntrans', yunit='es', ax=None, xlog=True, ylog=True, kargv)
 
def print_lines
 
def print_stats (self)
 
def __repr__ (self)
 
def __str__ (self)
 

Public Attributes

 log_
 logging tool [my_logging object] More...
 
 model_name
 name of the model [str] More...
 
 info
 
 calling
 
 model_name_s
 
 line_is_log
 
 distance
 distance to the object (kpc) More...
 
 empty_model
 
 liste_elem
 
 n_ions
 
 ionic_full
 
 ionic_names
 
 n_zones_full
 total number of zones, r_range unused [int] More...
 
 zones_full
 arrays of zones, r_range unused [int array] More...
 
 depth_full
 array of depths, r_range unused [float array] (cm) More...
 
 radius_full
 array of radius, r_range unused [float array] (cm) More...
 
 dv_full
 array of volume element of each zone, r_range unused float array More...
 
 dr_full
 array of thickness element of each zone, r_range unused [float array] (cm) More...
 
 r_in
 Initial radius [float] (cm) More...
 
 r_out
 Final radius [float] (cm) More...
 
 thickness_full
 total thickness of the nebula, r_range not used [float] (cm) More...
 
 ne_full
 array of electron density, r_range unused [float] (cm^-3) More...
 
 nH_full
 array of Hydrogen density, r_range unused [float] (cm^-3) More...
 
 te_full
 array of electron temperature, r_range unused [float] (K) More...
 
 nenH_full
 array of ne.nH, r_range unused [float] (cm^-6) More...
 
 tenenH_full
 array of te.ne.nH, r_range unused float More...
 
 n_lines
 
 lines
 
 intens
 
 slines
 
 rlines
 
 heat_full
 
 cool_full
 
 emis_full
 
 opd_energy
 
 opd_total
 
 opd_absorp
 
 opd_scat
 
 n_gtemp
 
 gtemp_full
 
 gsize
 
 gtemp_labels
 
 n_gabund
 
 gabund_full
 
 gasize
 
 gabund_labels
 
 n_gdgrat
 
 gdgrat_full
 
 gdsize
 
 gdgrat_labels
 
 plan_par
 
 Hbeta_full
 
 Phi0
 
 Phi
 
 ff_full
 array of filling factor, r_range unused [float] More...
 
 nenHff2_full
 
 nHff_full
 
 H_mass_full
 
 line_labels
 
 line_labels_17
 
 line_labels_13
 
 emis_labels
 
 emis_labels_17
 
 emis_labels_13
 
 n_emis
 
 n_elements
 
 out
 
 C3D_comments
 
 comments
 
 warnings
 
 cautions
 
 out_exists
 
 date_model
 
 Teff
 
 cloudy_version
 
 cloudy_version_major
 
 emis_is_log
 
 theta
 
 phi
 
 Q
 
 Q0
 
 abund
 
 gas_mass_per_H
 
 aborted
 

Properties

 r_out_cut = property(_get_r_out_cut, _set_r_out_cut, None, _r_out_cut_doc)
 User defined outer radius of the nebula [float] (cm). More...
 
 r_in_cut = property(_get_r_in_cut, _set_r_in_cut, None, 'User defined inner radius of the nebula.')
 User defined inner radius of the nebula [float] (cm) More...
 
 H_mass_cut = property(_get_H_mass_cut, _set_H_mass_cut, None, None)
 
 Hbeta_cut = property(_get_Hbeta_cut, _set_Hbeta_cut, None, None)
 

Detailed Description

Read the outputs of Cloudy into variables of the object. Also perform some computations like T0, t2 for all the ions and lines. Provides methods to access some outputs (e.g. continuum in various units)

The Cloudy model must have been run with the following punch or save in the input file:

set punch prefix "MODEL" (can be changed) punch last radius ".rad" punch last continuum ".cont" punch last physical conditions ".phy" punch last overview ".ovr" punch last grain temperature ".gtemp_full" punch last element hydrogen ".ele_H" punch last element helium ".ele_He" punch last element carbon ".ele_C" punch last element nitrogen ".ele_N" punch last element oxygen ".ele_O" punch last element argon ".ele_Ar" punch last element neon ".ele_Ne" punch last element sulphur ".ele_S" punch last element chlorin ".ele_Cl" punch last element iron ".ele_Fe" punch last element silicon ".ele_Si" punch last linelist ".lin" "liste_of_lines.dat" punch last lines emissivity ".emis" ... liste of lines ... No need to be the same as liste_of_lines.dat end of lines in case of version >= 10: save last grain abundances ".gabund_full"' save last grain D/G ratio ".gdgrat_full"'

usage: m1 = CloudyModel('MODEL') plot(m1.radius,m1.get_emis('Fe_3__5271A')) plot m1.depth,m1.te

y = 'e("TOTL__4363A")/e("O__3__5007A")' e = lambda line: m1.get_emis(line) plot m1.te,eval(y)

self.n_zones : number of zones Cloudy used. self.depth : depth in cm, ndarray(n_zones) self.radius : radius in cm, ndarray(n_zones) self.r_in and r_out : minimum and maximum of self.radius self.ne and nH : electron and H-densities in cm-3, ndarray(n_zones) self.te : electron temperature in K, ndarray(n_zones) self.nenH and tenenH : some products of the previous. self.T0 and self.t2: mean T and t2 for H+

self.n_lines : number of emission lines in the .lin file self.line_labels : lines names, ndarray(n_lines,dtype='S20') self.get_line : line intensities

some lines can appear more than one time in the list of lines, they then have a _N at the end of the label. the following deal with this: self.slines : array of uniq values for lines (single lines) self.n_slines : number of self.rlines : array of reduced labels : for duplicate lines, removing the trailing _N

dev comments:

GPL Chris.nosp@m..Mor.nosp@m.isset.nosp@m.@Gma.nosp@m.il.co.nosp@m.m

Constructor & Destructor Documentation

def __init__ (   self,
  model_name,
  verbose = None,
  read_all_ext = True,
  read_rad = True,
  read_phy = True,
  read_emis = True,
  read_grains = False,
  read_cont = True,
  read_heatcool = False,
  read_lin = False,
  read_opd = False,
  list_elem = LIST_ELEM,
  distance = None,
  line_is_log = False,
  emis_is_log = True,
  ionic_str_key = 'ele_' 
)

Cloudy model object.

param:
    - model_name [str] The name of the model to be read.
    - verbose [int] level of verbosity as defined by pyCloudy.my_logging.
    - read_all_ext [boolean] if True, all the extensions are read, if False no extension (empty object).
    - read_emis [boolean] if True, emissivities .emis file_ is read and interpreted.
    - read_grains [boolean] if True, grains .gtemp, .gdgrat and .gabund files are read and interpreted.
    - read_cont [boolean] if True, continuum .cont file_ is read and interpreted.
    - list_elem [list of str] list of elements X for which ionic abundance .ele_X file_ is read.
    - distance [float] distance to the nebula in kpc
    - line_is_log [boolean] if True, intensities in .lin file_ are in log, if False are in linear
    - emis_is_log [boolean] if True, intensities in .emis file_ are in log, if False are in linear

Member Function Documentation

def __repr__ (   self)
def __str__ (   self)
def add_emis_from_pyneb (   self,
  new_label,
  pyneb_atom,
  label = None,
  wave = None 
)
Add a new line emissivity using PyNeb.
new_label: name of the new emission line
pyneb_atom: a Atom or RecAtom PyNeb object
label or wave: identifier of the transition in the PyNeb object
example:
    M.add_emis_from_pyneb('O__2R_4639', O2, label='4638.86')
def cool (   self)

cooling [float array]

array of colling (on r_range)
def depth (   self)

depth [float array] (cm)

array of depth (on r_range)
def dr (   self)

size of each zone [float array] (cm)

array of dr (on r_range)
def drff (   self)

size of each zone taking into account filling factor [float array] (cm)

array of dr (on r_range)
def dv (   self)

volume of each zone [float array] (cm^3)

array of volume element (on r_range)
def dvff (   self)

volume of each zone taking into account filling factor [float array] (cm^3)

array of volume element (on r_range)
def emis_from_pyneb (   self,
  emis_labels = None,
  atoms = None 
)
change the emissivities using PyNeb.
emis_labels: list of line to be changed. If unset, all the lines will be changed. You may generate emis_labels
    this way (here to select only S lines): S_labels = [emis for emis in CloudyModel.emis_labels if emis[0:2] == 'S_']
atoms: dictionary of pyneb.Atom objects to be used. If unset, all the atoms will be build 
    using pyneb. This allows the user to mix atomic dataset by creating atoms outside CloudyModel. Keys
    of the dictionnary pointing to None instaed of an Atom will not change the corresponding emissivities.
def ff (   self)

filling factor [float array]

array of filling factor (on r_range)
def gabund (   self)
def gdgrat (   self)
def get_ab_ion_rad (   self,
  elem = None,
  ion = None 
)

get_ab_ion_rad(X, i) = $\frac{\int X^i/X.n_H.ff.dr}{\int n_H.ff.dr}$

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    Ionic fraction integrated on the radius weighted by nH
def get_ab_ion_rad_ne (   self,
  elem = None,
  ion = None 
)

get_ab_ion_rad_ne(X, i) = $\frac{\int Xi/X.n_e.n_H.ff.dr}{\int ne.nH.ff.dr}$

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    ionic fraction integrated on the radius weighted by ne.nH
def get_ab_ion_vol (   self,
  elem = None,
  ion = None 
)

get_ab_ion_vol(X, i) = $ \frac{\int X^i/X.n_H.ff.dr}{\int n_H.ff.dr}$

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    Ionic fraction integrated on the volume weighted by hydrogen density
def get_ab_ion_vol_ne (   self,
  elem = None,
  ion = None 
)

get_ab_ion_vol_ne(X, i) = $\frac{\int Xi/X.n_e.n_H.ff.dV}{\int ne.nH.ff.dV}$

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    ionic fraction integrated on the volume weighted by ne.nH
def get_cont_x (   self,
  unit = 'Ryd' 
)

Return the wavelength/energy/frequency array.

param:
    unit : one of ['Ryd','eV','Ang','mu','cm-1','Hz']
return:
    continuum X: wavelength, energys, wv number, or frequency
def get_cont_y (   self,
  cont = 'incid',
  unit = 'es',
  dist_norm = 'at_earth' 
)

Return the continuum flux (stellar or nebular, depending on cont parameter.

param:
    cont : one of ['incid','trans','diffout','ntrans','reflec']
    unit : one of ['esc', 'ec3','es','esA','esAc','esHzc','Jy','Q', 'Wcmu', 'phs', 'phsmu']
    dist_norm : one of ['at_earth', 'r_out', a float for a distance in cm]
return:
    continuum flux or intensity
First define which of the 5 continua will be return 
def get_emis (   self,
  ref 
)

return the emissivities(radius) of the given line array float

Return emissivity.
param:
    ref can be a label or a number (starting at 0 with the first line)
def get_emis_rad (   self,
  ref 
)

get_emis_rad(ref) = $ \int \epsilon(ref).dr$

Return integration of the emissivity on the radius
param:
    ref can be a label or a number (starting at 0 with the first line)
def get_emis_vol (   self,
  ref,
  at_earth = False 
)

get_emis_vol(ref, [at_earth]) = $ \int \epsilon(ref).dV [/ 4.\pi.(distance)^2]$

Return integration of the emissivity on the volume (should be the line intensity if r_out_cut>=r_out)
param:
    ref can be a label or a number (starting at 0 with the first line)
def get_EW (   self,
  label,
  lam0,
  lam_inf,
  lam_sup 
)
Equivalent Width:
Returns -lam0 * I(label) / continuum(lam0)
where continuum(lam0) is estimated by looking for the minimum of the net transmited continuum between
lam_inf and lam0 on one side, and lam0 and lam_sup on the other side, and meaning them.
In case of steep continuum or absorbtion lines, the mean continuum is underestimated.
def get_EW2 (   self,
  label,
  lam0,
  lam_inf,
  lam_sup,
  plot = False 
)
Equivalent Width:
Returns -lam0 * I(label) / continuum(lam0)
where continuum(lam0) is estimated by fitting the continuum between [lam_inf, lam0*0.99] and [lam0*1.01, lam_sup]
and applying the fit to lam0.
Of course, if strong emission/absorbtion lines are included in this domain, the results is not correct
def get_G0 (   self,
  lam_min = 913,
  lam_max = 1e8,
  dist_norm = 'r_out',
  norm = 1.6e-6,
  unit = 'Wm' 
)

get_G0 = integral(f_lambda .

dlambda) Between lam_min and lam_max (Ang), normalized by norm, in unit of W.m-2 or erg.cm-3

Normalisation from Habing 1968: 1.6e-6 erg.cm-2.s-1
def get_Ha_EW (   self)

Ha_EW = - $\lambda_\alpha$ x I$_\alpha^{line}$ / $\lambda.F_\alpha^{cont}$.

Halpha Equivalent Width:
Returns -6563 * I(H__1__6563A) / continuum(6563)
where continuum(6563) is estimated by looking for the minimum of the net transmited continuum between
6260 and 6560 on one side, and 6560 and 6860 on the other side, and meaning them.
def get_Hb_EW (   self)

Hb_EW = - $\lambda_\beta$ x I$_\beta^{line}$ / $\lambda.F_\beta^{cont}$.

Hbeta Equivalent Width:
Returns -4861 * I(H__1__4861A) / continuum(4860)
where continuum(4860) is estimated by looking for the minimum of the net transmited continuum between
4560 and 4860 on one side, and 4860 and 5160 on the other side, and meaning them.
def get_Hb_SB (   self)

Hb_SB = I $_\beta / (Rout^2 * pi * 206265.^2)$.

Hbeta surface brightness:
Returns Ibeta / (Rout**2 * pi * 206265.**2)
def get_ionic (   self,
  elem,
  ion 
)
param
    elem [str] element
    ion [str or int] ionic state of ion
return: 
    ionic fraction of (elem, ion). 
def get_line (   self,
  ref 
)
Return line intensity.
ref can be a label or a number (starting at 0 with the first line)
def get_ne_emis (   self,
  ref 
)

get_ne_emis(ref) = $\frac{\int n_e.\epsilon(ref).dV}{\int \epsilon(ref).dV}$

integral of the electron density on the volume, weighted by emissivity of a given line
param:
    ref [int or str] line reference
return:
    [float]
def get_ne_ion_rad_ne (   self,
  elem = None,
  ion = None 
)

get_ne_ion_rad_ne(X, i) = $\frac{\int ne.ne.nH.ff.Xi/X.dr}{\int ne.nH.ff.Xi/X.dr}$

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    electron density integrated on the radius weighted by ne.nH.Xi/X
def get_ne_ion_vol_ne (   self,
  elem = None,
  ion = None 
)

get_ne_ion_vol_ne(X, i) = $\frac{\int ne.ne.nH.ff.Xi/X.dV}{\int ne.nH.ff.Xi/X.dV}$

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    electron density integrated on the volume weighted by ne.nH.Xi/X
def get_T0_emis (   self,
  ref 
)

get_T0_emis(ref) = $\frac{\int T_e.\epsilon(ref).dV}{\int \epsilon(ref).dV}$

integral of the electron temperature on the volume, weighted by emissivity of a given line
param:
    ref [int or str] line reference
return:
    [float]
def get_T0_emis_rad (   self,
  ref 
)

get_T0_emis_rad(ref) = $\frac{\int T_e.\epsilon(ref).dr}{\int \epsilon(ref).dr}$

integral of the electron temperature on the radius, weighted by emissivity of a given line
param:
    ref [int or str] line reference
return:
    [float]
def get_T0_ion_rad (   self,
  elem = None,
  ion = None 
)

get_T0_ion_rad(X, i) = $ \frac{\int T_e.n_H.ff.X^i/X.dr}{\int n_H.ff.X^i/X.dr}$

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    Electron temperature integrated on the radius weighted by ionic abundance
def get_T0_ion_rad_ne (   self,
  elem = None,
  ion = None 
)

get_T0_ion_rad_ne(X, i) = $\frac{\int Te.ne.nH.ff.Xi/X.dr}{\int ne.nH.ff.Xi/X.dr}$

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    electron temperature integrated on the radius weighted by ne.nH.Xi/X
def get_T0_ion_vol (   self,
  elem = None,
  ion = None 
)

get_T0_ion_vol(X, i) = $ \frac{\int T_e.n_H.ff.X^i/X.dV}{\int n_H.ff.X^i/X.dV}$

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    Electron temperature integrated on the volume weighted by ionic abundance
def get_T0_ion_vol_ne (   self,
  elem = None,
  ion = None 
)

get_T0_ion_vol_ne(X, i) = $\frac{\int Te.ne.nH.ff.Xi/X.dV}{\int ne.nH.ff.X^i/X.dV}$

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    electron temperature integrated on the volume weighted by ne.nH.Xi/X
def get_t2_emis (   self,
  ref 
)

get_t2_emis(ref) = $\frac{\int (T_e-T(ref))^2.\epsilon(ref).dV}{T(ref)^2\int \epsilon(ref).dV}$

t2(emissivity) integrated on the volume, weigthed by the emissivity
param:
    ref [int or str] line reference
return:
    [float]
def get_t2_ion_rad_ne (   self,
  elem = None,
  ion = None 
)

get_t2_ion_vol_ne(X, i) = $\frac{\int (T_e-T_{X^i})^2.n_e.n_H.ff.X^i/X.dr}{T_{X^i}^2.\int ne.nH.ff.X^i/X.dr}$

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    t2 integrated on the radius weighted by ne.nH.X^i/X
def get_t2_ion_vol_ne (   self,
  elem = None,
  ion = None 
)

get_t2_ion_vol_ne(X, i) = $\frac{\int (T_e-T_{X^i})^2.n_e.n_H.ff.X^i/X.dV}{T_{X^i}^2.\int ne.nH.ff.X^i/X.dV}$

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    t2 integrated on the volume weighted by ne.nH.X^i/X
def gmass (   self)
def gtemp (   self)
def H0_mass (   self)

H0_mass = $ \int m_H.n_{H^0}.ff.dV$ [solar mass].

Return the H0 mass of the nebula in solar mass
def H_mass (   self)

H0_mass = $ \int m_H.n_H.ff.dV$ [solar mass].

Return the H mass of the nebula in solar mass
def Hbeta (   self)

Hbeta = $ \int Hbeta.n_H.ff.dV$ [solar mass].

Return the intensity of Hbeta
def heat (   self)

heating [float array]

array of heating (on r_range)
def Hp_mass (   self)

Hp_mass = $ \int m_H.n_{H^+}.ff.dV$ [solar mass].

Return the H+ mass of the nebula in solar mass
def is_valid_ion (   self,
  elem,
  ion 
)

is_valid_ion(elem, ion) return True if elem, ion is available in get_ionic.

param:
    elem [str] element
    ion [str or int] ionic state of ion
return:    
    [boolean] True if elem,ion has value for get_ionic(elem, ion)
def log_U (   self)

log(U) in each zone [float array], with U(r) = $ Phi_0 * (r_0/r)^2/ (n_H.c)$

U = Phi0 * (r_in/rarius) / (nH c)
def log_U_mean (   self)

log_U_mean = $\frac{\int U.dV}{\int dV}$ [float]

log of mean value of U on the volume 
def log_U_mean_ne (   self)

log_U_mean_ne = $\frac{\int U.ne.nH.dV}{\int ne.nH.dV}$ [float]

log of mean value of U on the volume weighted by ne.nH
def n_zones (   self)

number of zones [int]

def ne (   self)

electron density [float array] (cm^-3)

array of electron density (on r_range)
def nenH (   self)

ne.nH [float array] (cm^-6)

array of ne.nH (on r_range)
def nH (   self)

Hydrogen density [float array] (cm^-3)

array of Hydrogen density (on r_range)
def nH_mean (   self)
mean of the Hydrogen density over the volume
return:
    [float]
def plot_spectrum (   self,
  xunit = 'eV',
  cont = 'ntrans',
  yunit = 'es',
  ax = None,
  xlog = True,
  ylog = True,
  kargv 
)
plot the spectrum of the model.
parameters:
    - xunit ['eV']
    - cont ['ntrans']
    - yunit ['es']
    - ax
    - xlog [True]
    - ylog [True]
    - **kargv passed to the plot.
def print_lines (   self,
  ref = None,
  norm = None,
  at_earth = False,
  use_emis = True 
)
Print line intensities
param:
    at_earth [boolean] if True, divide the intensity by 4.pi.distance^2
    ref [int or str] reference of a line (if None, all lines are printed)
    norm [int or str] reference of a line to normalize the intensities
    use_emis [boolean] use integral of emissivity (default) or line intensities
def print_stats (   self)
def r_range (   self)

Boolean array defining the range used for the radial parameters (such as ne, ionic, integrals, etc) Defined by r_in_cut and r_out_cut.

boolean array. True for r_in_cut < radius < r_out_cut, False elsewhere.
Used in most of the parameter calls such as te, get_emis, get_ionic, etc
def rad_integ (   self,
  a 
)

rad_integ(a) = $\int a.ff.dr$

integral of a on the radius
def rad_mean (   self,
  a,
  b = 1. 
)

rad_mean(a, b) = $\frac{\int a.b.dr}{\int b.dr}$

Return the mean value of a weighted by b on the radius
def radius (   self)

radius [float array] (cm)

array of radius (on r_range)
def read_outputs (   self,
  extension,
  delimiter = '\t',
  comments = ';',
  names = True,
  kwargs 
)
def T0 (   self)

Mean Temperature $T0=\frac{\int T_e.n_e.n_H.ff.dV}{\int n_e.n_H.ff.dV}$.

def t2 (   self)

t2 a la Peimbert $t^2=\frac{\int (T_e-T0)^2.n_e.n_H.ff.dV}{T0^2 \int n_e.n_H.ff.dV}$

def te (   self)

Electron temperature [float array] (K)

array of electron temperature (on r_range)
def tenenH (   self)

te.ne.nH float array

array of Te.ne.nH (on r_range)
def thickness (   self)

thickness [float array] (cm)

array of thickness (on r_range)
def vol_integ (   self,
  a 
)

vol_integ(a) = $\int a.ff.dV$

integral of a on the volume
def vol_mean (   self,
  a,
  b = 1. 
)

vol_mean(a, b) = $\frac{\int a.b.ff.dV}{\int b.ff.dV}$

Return the mean value of a weighted by b on the volume
def zones (   self)

array of zones [int array]

Member Data Documentation

aborted
abund
C3D_comments
calling
cautions
cloudy_version
cloudy_version_major
comments
cool_full
date_model
depth_full

array of depths, r_range unused [float array] (cm)

distance

distance to the object (kpc)

dr_full

array of thickness element of each zone, r_range unused [float array] (cm)

dv_full

array of volume element of each zone, r_range unused float array

emis_full
emis_is_log
emis_labels
emis_labels_13
emis_labels_17
empty_model
ff_full

array of filling factor, r_range unused [float]

gabund_full
gabund_labels
gas_mass_per_H
gasize
gdgrat_full
gdgrat_labels
gdsize
gsize
gtemp_full
gtemp_labels
H_mass_full
Hbeta_full
heat_full
info
intens
ionic_full
ionic_names
line_is_log
line_labels
line_labels_13
line_labels_17
lines
liste_elem
log_

logging tool [my_logging object]

model_name

name of the model [str]

model_name_s
n_elements
n_emis
n_gabund
n_gdgrat
n_gtemp
n_ions
n_lines
n_zones_full

total number of zones, r_range unused [int]

ne_full

array of electron density, r_range unused [float] (cm^-3)

nenH_full

array of ne.nH, r_range unused [float] (cm^-6)

nenHff2_full
nH_full

array of Hydrogen density, r_range unused [float] (cm^-3)

nHff_full
opd_absorp
opd_energy
opd_scat
opd_total
out
out_exists
Phi
phi
Phi0
plan_par
Q
Q0
r_in

Initial radius [float] (cm)

r_out

Final radius [float] (cm)

radius_full

array of radius, r_range unused [float array] (cm)

rlines
slines
te_full

array of electron temperature, r_range unused [float] (K)

Teff
tenenH_full

array of te.ne.nH, r_range unused float

theta
thickness_full

total thickness of the nebula, r_range not used [float] (cm)

warnings
zones_full

arrays of zones, r_range unused [int array]

Property Documentation

H_mass_cut = property(_get_H_mass_cut, _set_H_mass_cut, None, None)
static
Hbeta_cut = property(_get_Hbeta_cut, _set_Hbeta_cut, None, None)
static
r_in_cut = property(_get_r_in_cut, _set_r_in_cut, None, 'User defined inner radius of the nebula.')
static

User defined inner radius of the nebula [float] (cm)

r_out_cut = property(_get_r_out_cut, _set_r_out_cut, None, _r_out_cut_doc)
static

User defined outer radius of the nebula [float] (cm).

For example: r_out_cut = m.radius[m.zones[m.ionic['H'][1] < 0.2][0]]. It is used to define r_range and thus all the radial properties of the nebula