ocelot.common.globals
¶
Module Contents¶
-
ocelot.common.globals.
pi
= 3.141592653589793¶
-
ocelot.common.globals.
speed_of_light
= 299792458.0¶
-
ocelot.common.globals.
q_e
= 1.6021766208e-19¶
-
ocelot.common.globals.
m_e_kg
= 9.10938215e-31¶
-
ocelot.common.globals.
h_J_s
= 6.62607004e-34¶
-
ocelot.common.globals.
m_e_eV
¶
-
ocelot.common.globals.
m_e_MeV
¶
-
ocelot.common.globals.
m_e_GeV
¶
-
ocelot.common.globals.
mu_0
¶
-
ocelot.common.globals.
epsilon_0
¶
-
ocelot.common.globals.
h_eV_s
¶
-
ocelot.common.globals.
hr_eV_s
¶
-
ocelot.common.globals.
ro_e
¶
-
ocelot.common.globals.
lambda_C
¶
-
ocelot.common.globals.
lambda_C_r
¶
-
ocelot.common.globals.
I_Alfven
¶
-
ocelot.common.globals.
Cgamma
¶
-
ocelot.common.globals.
Cq
¶
-
ocelot.common.globals.
Z0
¶
-
ocelot.common.globals.
alpha
¶ - def lambda2eV(Lambda):
Eph = h_eV_s*speed_of_light/Lambda return Eph
- def eV2lambda(Ephoton):
Lambda = h_eV_s*speed_of_light/Ephoton return Lambda
- def Ephoton2K(Eph, lu = 0.04, Eeb = 14):
gamma = Eeb/m_e_GeV K = np.sqrt(4.*gamma*gamma/lu*h_eV_s*speed_of_light/Eph - 2) return K
- def K2Ephoton(K, lu = 0.04, E=14):
gamma = E/m_e_GeV Eph = 4.*gamma*gamma*h_eV_s*speed_of_light/((K*K + 2)*lu) return Eph
- def K2Lambda(K, lu = 0.04, E=14):
gamma = E/m_e_GeV Eph = 4.*gamma*gamma*h_eV_s*speed_of_light/((K*K + 2)*lu) Lambda = eV2lambda(Eph) return Lambda
- def field2K(field, lu = 0.04):
K = field*lu*speed_of_light/(m_e_eV*2.*pi) return K
- def K2field(K, lu = 0.04):
field = K*m_e_eV*2.*pi/(lu*speed_of_light) return field
- def field2Ephoton(field, lu=0.04, E=14):
gamma = E/m_e_GeV K = field2K(field, lu) l = lu/(2.*gamma*gamma)*(1.+K*K/2.) Eph = h_eV_s*speed_of_light/l return Eph
- def Ephoton2field(energy, lu = 0.04, Eeb = 14):
K = Ephoton2K(energy, lu, Eeb) field = K*2.*pi*m_e_eV/(lu*speed_of_light) return field