-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.py
executable file
·57 lines (53 loc) · 2.28 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env python
'''
Name : Constants, constants.py
Author: Nickalas Reynolds
Date : Fall 2017
Misc : File for handling miscellaneous constants
'''
class constants:
# %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&
# CGS PHYSICAL CONSTANTS
# %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&
c = 2.99792458e10 # speed of light CGS
h = 6.6260755e-27 # Planck's constant CGS
g = 6.67259e-8 # Grav const CGS
kb = 1.380658e-16 # Boltzmann's const CGS
a = 7.56591e-15 # Radiation constant CGS
sb = 5.67051e-5 # sigma (stefan-boltzmann const) CGS
qe = 4.803206e-10 # Charge of electron CGS
ev = 1.60217733e-12 # Electron volt CGS
na = 6.0221367e23 # Avagadro's Number
me = 9.1093897e-28 # electron mass CGS
mp = 1.6726231e-24 # proton mass CGS
mn = 1.674929e-24 # neutron mass CGS
mh = 1.673534e-24 # hydrogen mass CGS
amu = 1.6605402e-24 # atomic mass unit CGS
pi = 3.141592653589793238
hour = 3.6e3 # s
day = 8.64e4 # s
year = 3.1557600e7 # s
# %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&
# ASTRONOMICAL CONSTANTS
# %&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&
# GENERAL
au = 1.496e13 # astronomical unit CGS
pc = 3.0857e18 # parsec CGS
yr = 3.155815e7 # sidereal year CGS
ms = 1.98900e+33 # solar mass CGS
rs = 6.9599e10 # sun's radius CGS
ls = 3.839e33 # sun's luminosity CGS
mm = 7.35000e+25 # moon mass CGS
mer = 5.97400e+27 # earth mass CGS
rer = 6.378e8 # earth's radius CGS
medd = 3.60271e+34 # Eddington mass CGS
mj = 1.89813e30 # Jupiter mass CGS
ts = 5.78e3 # K
arcsec = 4.84813681e-6 # radians
# RADIO SPECIFIC
jy = 1.e-23 # Jansky CGS
restfreq_hi = 1420405751.786 # 21cm transition (Hz)
restfreq_co = 115271201800. # CO J=1-0 (Hz)
cm2perkkms_hi = 1.823e18 # HI column per intensity (thin)
if __name__ == "__main__":
print('Testing module')