Package chianti :: Module constants
[hide private]
[frames] | no frames]

Source Code for Module chianti.constants

 1  ''' 
 2  A set of physical constants. 
 3   
 4  Copyright 2009, 2010 Kenneth P. Dere 
 5   
 6  unit system is cgs (mostly) 
 7   
 8  This software is distributed under the terms of the GNU General Public License 
 9  that is found in the LICENSE file 
10   
11   
12  Most are from http://physics.nist.gov/cuu - the NIST Reference on 
13  Constants, Units and Uncertainty 
14  ''' 
15   
16  import numpy as np 
17  planck = 6.6260693e-27   #erg s 
18  planckEv = 4.13566743e-15  # ev s 
19  light = 29979245800.  # cm/s 
20  ev2Ang = 12.39841875e+3 
21  ev2Erg = 1.602176487e-12 
22  pi = 3.1415926535897931 
23  boltzmann = 1.3806504e-16  # cgs 
24  stefanBoltzmann = 5.670373e-5  # cgs - ergs cm^-2 K^-4 s^-1 
25  boltzmannEv = 8.617343e-5 
26  invCm2Ev = 1./8.06554465e+3 
27  invCm2ryd = 1./109737.32 
28  ryd2Ev = 13.6056923 
29  ryd2erg = 2.17987197e-11  #erg 
30  fine = 7.2973525376e-3  # fine structure constant ~ 1./137 
31  emass = 9.10938215e-28  #  electron mass in gram 
32  bohr = 0.52917720859e-8  # bohr radius in cm 
33  hartree = 4.35974434e-11 #  erg 
34  hartreeEv = 27.21138505 
35  # 
36  # derived constants 
37  hc = planck*light 
38  # 
39  # area of bohr orbit 
40  bohrCross = pi*bohr**2 
41  # 
42  std2fwhm = 2.*np.sqrt(2.*np.log(2.)) 
43  # 
44  invCm2Erg = planck*light 
45  # 
46  boltzmannRyd = boltzmannEv/ryd2Ev 
47  # 
48  # collision produces the 8.63e-6 factor 
49  collision = planck**2/((2.*pi*emass)**1.5*np.sqrt(boltzmann)) 
50  # 
51  freeFree = 1.e+8*(light/(3.*emass))*(fine*planck/pi)**3*np.sqrt((2.*pi)/(3.*emass*boltzmann)) 
52  # 
53  sutherland = (2./(3.*np.sqrt(3.)))*np.sqrt(pi/(2.*boltzmann*emass**3))*(planck*fine/pi)**3 
54  # 
55  freeBound = 1.e+8*(8.*fine*(planck**3))/(3.*np.sqrt(3.)*np.pi*(emass**4)*light)*(emass/(2.*np.pi*boltzmann))**1.5 
56  # 
57  verner = (1.e-8/(planck*light**3*emass**3))*(emass/(2.*pi*boltzmann))**1.5 
58  # 
59  freeFreeLoss = (8./3.)*np.sqrt(pi*boltzmann/(6.*emass**3))*(planck/pi)**2*fine**3 
60  # 
61  freeBoundLoss = ((16.*fine*(planck**2))/(3.*pi*np.sqrt(3.)*(emass**3)*(light**2)))*np.sqrt(emass/(2.*pi*boltzmann)) 
62  # 
63  # astronomical 
64  luminositySun = 3.86e+33 # ergs/s 
65  radiusSun = 6.955e+10  # mean radius of Sun in cm 
66  parsec = 3.08568025e+18  # cm 
67  # 
68  El = ['h','he','li','be','b','c','n','o','f','ne','na', \ 
69      'mg','al','si','p','s','cl','ar','k','ca','sc','ti', \ 
70      'v','cr','mn','fe','co','ni','cu','zn',\ 
71      'ga','ge','as','se','br','kr'] 
72  Ionstage = ['I','II','III','IV','V','VI','VII','VIII','IX','X','XI','XII','XIII', \ 
73      'XIV','XV','XVI','XVII','XVIII','XIX','XX','XXI',' XXII','XXIII','XXIV', \ 
74      'XXV','XXVI','XXVII','XXVIII','XXIX','XXX','XXXI','XXXII','XXXIII','XXXIV', \ 
75      'XXXV','XXXVI','XXXVII'] 
76  Spd = ['S', 'P', 'D', 'F', 'G', 'H', 'I', 'K', 'L', 'M', 'N', 'O', 'Q', 'R', 'T', 'U', 'V', 'W', 
77         'X','Y', 'Z', 'A','B', 'C', 'S1', 'P1', 'D1', 'E1', 'F1', 'G1', 'H1', 'I1', 'K1', 'L1', 'M1', 'N1', 'O1', 'Q1', 'R1', 'T1', 'U1', 'V1', 'W1','X1','Y1', 'Z1', 'A1','B1', 'C1'] 
78  # 
79  #  data for Gauss-Laguerre integration 
80  # 
81  ngl =  12 
82  xgl = np.asarray([0.115722117358021,0.611757484515131,1.512610269776419,2.833751337743509 
83      ,4.599227639418353,6.844525453115181,9.621316842456871,13.006054993306350 
84      ,17.116855187462260,22.151090379396983,28.487967250983992,37.099121044466926], 'float64') 
85   
86   
87  wgl = np.asarray([2.647313710554435e-01,3.777592758731382e-01,2.440820113198774e-01,9.044922221168074e-02 
88      ,2.010238115463406e-02,2.663973541865321e-03,2.032315926629993e-04,8.365055856819753e-06 
89      ,1.668493876540914e-07,1.342391030515027e-09,3.061601635035012e-12,8.148077467426124e-16], 'float64') 
90