-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
38 lines (37 loc) · 1.92 KB
/
test.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
from Planck.Planck_int import Radiance, Radiant_emit, Photon_radiance,\
Photon_radiant_emit, BB_plot
from astropy import units as u
# This is a test of all the functions contained in the Planck_int module
print("\n")
print(Radiance(5778.55, 3.7474e14*u.Hz, 4.2827e14*u.Hz))
print(Radiance(5778.55, 700*u.nm, 800*u.nm))
print(Radiance(5778.55, 7000e-10*u.m, 8000e-10*u.m))
print(Radiance(5778.55, 1.5498 *u.eV, 1.7712*u.eV))
print(Radiance(5778.55, 2.4830532e-19 *u.J, 2.8377751e-19*u.J))
print(Radiance(5778.55, 2.4830532e-12 *u.erg, 2.8377751e-12*u.erg))
print("\n")
print(Radiant_emit(5778.55, 3.7474e14*u.Hz, 4.2827e14*u.Hz))
print(Radiant_emit(5778.55, 7000*u.Angstrom, 8000*u.Angstrom))
print(Radiant_emit(5778.55, 700*u.nm, 800*u.nm))
print(Radiant_emit(5778.55, 7000e-10*u.m, 8000e-10*u.m))
print(Radiant_emit(5778.55, 1.5498 *u.eV, 1.7712*u.eV))
print(Radiant_emit(5778.55, 2.4830532e-19 *u.J, 2.8377751e-19*u.J))
print(Radiant_emit(5778.55, 2.4830532e-12 *u.erg, 2.8377751e-12*u.erg))
print("\n")
print(Photon_radiance(5778.55, 3.7474e14*u.Hz, 4.2827e14*u.Hz))
print(Photon_radiance(5778.55, 700*u.nm, 800*u.nm))
print(Photon_radiance(5778.55, 7000e-10*u.m, 8000e-10*u.m))
print(Photon_radiance(5778.55, 1.5498 *u.eV, 1.7712*u.eV))
print(Photon_radiance(5778.55, 2.4830532e-19 *u.J, 2.8377751e-19*u.J))
print(Photon_radiance(5778.55, 2.4830532e-12 *u.erg, 2.8377751e-12*u.erg))
print("\n")
print(Photon_radiant_emit(5778.55, 3.7474e14*u.Hz, 4.2827e14*u.Hz))
print(Photon_radiant_emit(5778.55, 7000*u.Angstrom, 8000*u.Angstrom))
print(Photon_radiant_emit(5778.55, 700*u.nm, 800*u.nm))
print(Photon_radiant_emit(5778.55, 7000e-10*u.m, 8000e-10*u.m))
print(Photon_radiant_emit(5778.55, 1.5498 *u.eV, 1.7712*u.eV))
print(Photon_radiant_emit(5778.55, 2.4830532e-19 *u.J, 2.8377751e-19*u.J))
print(Photon_radiant_emit(5778.55, 2.4830532e-12 *u.erg, 2.8377751e-12*u.erg))
print("/n")
BB_plot(0*u.eV, 5*u.eV, 10000)
BB_plot(1000*u.Angstrom, 7000*u.Angstrom, 10000)