gtsimulation.Global package

Submodules

gtsimulation.Global.codes.BreakCode = {'Death': -2, 'Dist2Path': 4, 'Loop': -1, 'MaxPath': 9, 'MaxRev': 11, 'MaxTime': 10, 'Rmax': 8, 'Rmin': 3, 'Xmax': 5, 'Xmin': 0, 'Ymax': 6, 'Ymin': 1, 'Zmax': 7, 'Zmin': 2}

Simulation break reasons and the corresponding code.

Parameters:
  • Loop – The simulation went through all its steps

  • Xmin:Ymin:Zmin – The absolute value of x, y, z coordinate is less than Xmin, Ymin, Zmin (in MagneticFields units)

  • Xmax:Ymax:Zmax – The absolute value of x, y, z coordinate is greater than Xmax, Ymax, Zmax (in MagneticFields units)

  • Rmin:Rmax – The radius is less(greater) than Rmin`(`Rmax) (in MagneticField units)

  • Dist2Path – The fraction of the distance travelled to the path is less than the Dist2Path.

  • Death – The particle went into an nuclear interaction.

  • MaxPath:MaxTime – The path (time) travelled is greater than the parameters (in MagneticFields units for MaxPath)

  • MaxRev – The maximum number of revolutions.

gtsimulation.Global.codes.BreakIndex = {-2: 'Death', -1: 'Loop', 0: 'Xmin', 1: 'Ymin', 2: 'Zmin', 3: 'Rmin', 4: 'Dist2Path', 5: 'Xmax', 6: 'Ymax', 7: 'Zmax', 8: 'Rmax', 9: 'MaxPath', 10: 'MaxTime', 11: 'MaxRev'}

The inverse dict to BreakCode

gtsimulation.Global.codes.SaveCode = {'Angles': (5, 12), 'Bfield': (4, slice(9, 12, 1)), 'Clock': (8, 15), 'Coordinates': (1, slice(0, 3, 1)), 'Density': (7, 14), 'Efield': (3, slice(6, 9, 1)), 'Energy': (9, 16), 'GuidingCenter': (12, slice(18, 21, 1)), 'LarmorRadii': (11, 18), 'Path': (6, 13), 'PitchAngles': (10, 17), 'Velocities': (2, slice(3, 6, 1))}

The parameters that can be saved along the path and the corresponding indices in the matrix.

class gtsimulation.Global.consts.Constants[source]

Bases: object

alpha = 0.0072973525664
ao = 5.291772086e-09
c = 299792458.0
e = 1.602176634e-19
h = 6.62607015e-34
hbar = 6.582119514e-22
hbarc = 197.3269788
me = 0.5109989461
mhe4 = 3728.40129745092
u = 4.00260325413
class gtsimulation.Global.consts.Origins(*values)[source]

Bases: Enum

Albedo = 2
Galactic = 1
Precipitated = 4
QuasiTrapped = 3
Trapped = 5
Unknown = 6
class gtsimulation.Global.consts.Units[source]

Bases: object

AU = 149597870700.0
AU2km = 149597870.7
AU2m = 149597870700.0
EeV = 1000000000000.0
GV = 1000.0
GeV = 1000.0
MV = 1
MeV = 1
MeV2g = 1.7826619216224e-27
MeV2kg = 1.7826619216224e-30
PV = 1000000000.0
PeV = 1000000000.0
RE = 6378137.1
RE2km = 6378.1371
RE2m = 6378137.1
RM2km = 1737.4
RM2m = 1737400
T2nT = 1000000000.0
TV = 1000000.0
TeV = 1000000.0
V = 1e-06
astronomicalunit = 149597870700.0
day = 86400
deg = 1
degree = 1
eV = 1e-06
earthradius = 6378137.1
electronvolt = 1e-06
exaelectronvolt = 1000000000000.0
fm2cm = 1e-13
gigaelectronvolt = 1000.0
gigavolt = 1000.0
kV = 0.001
keV = 0.001
kiloelectronvolt = 0.001
kilometer = 1000.0
kiloparsec = 3.08567758149e+19
kilovolt = 0.001
km = 1000.0
km2m = 1000.0
kpc = 3.08567758149e+19
kpc2m = 3.08567758149e+19
m = 1
megaelectronvolt = 1
megavolt = 1
meter = 1
microsecond = 1e-06
millisecond = 0.001
ms = 0.001
nanosecond = 1e-09
ns = 1e-09
parsec = 3.08567758149e+16
pc = 3.08567758149e+16
pc2m = 3.08567758149e+16
petaelectronvolt = 1000000000.0
petavolt = 1000000000.0
rad = 57.29577951308232
radian = 57.29577951308232
s = 1
second = 1
teraelectronvolt = 1000000.0
teravolt = 1000000.0
us = 1e-06
volt = 1e-06
year = 31557600.0
gtsimulation.Global.functions.vecRotMat(f, t)[source]
class gtsimulation.Global.regions.Regions(*values)[source]

Bases: Enum

Galaxy = <class 'gtsimulation.Global.regions._Galaxy'>
Heliosphere = <class 'gtsimulation.Global.regions._Heliosphere'>
Magnetosphere = <class 'gtsimulation.Global.regions._Magnetosphere'>
Undefined = <class 'gtsimulation.Global.regions._Undefined'>

Module contents