gtsimulation.particle#

Particle definitions and initial conditions.

This subpackage provides tools for defining particle properties and generating initial particle states, including spatial, energy, and velocity distributions.

class gtsimulation.particle.CRParticle(r=array([1, 0, 0]), v=array([1, 0, 0]), T=1, E=None, **kwargs)[source]#
class gtsimulation.particle.Flux(Spectrum: AbsSpectrum, Distribution: AbsDistribution, Names=None, PDGcode=None, Nevents: int = 1, V0=None, Mode: GeneratorModes | str = GeneratorModes.Inward, *args, **kwargs)[source]#
generate()[source]#
generate_coordinates(*args, **kwargs)[source]#
generate_energy_spectrum(*args, **kwargs)[source]#
generate_particles()[source]#
class gtsimulation.particle.FluxPitchPhase(Bfield, Pitch=None, Phase=None, *args, **kwargs)[source]#
class gtsimulation.particle.GyroCenterFlux(Bfield, Pitchd, Phased, CooGyr, *args, **kwargs)[source]#
generate()[source]#
static larmor(T, Bm, M, Z, pitchd)[source]#
Parameters:
  • T – kinetic energy in MeV

  • Bm – Magnetic field intensity in nT

  • M – mass in MeV

  • Z – charge number

  • pitchd – pitch angle in degree

Returns:

Output larmor radius in m

class gtsimulation.particle.Particle(Name=None, PDG=None)[source]#
gtsimulation.particle.gcr_flux(energy_per_nucleon, particle, modulation_potential, model=None)[source]#

Calculate the flux of galactic cosmic rays in the force-field approximation [1].

Parameters:
energy_per_nucleonfloat or array_like

Kinetic energy per nucleon in MeV; for electrons and positrons, the kinetic energy.

particleParticle or str

Particle object or name.

modulation_potentialfloat

Modulation potential in MV.

modelstr or None, optional

LIS model, see local_interstellar_spectrum.

Returns:
float or numpy.ndarray

Differential intensity in (m2 s sr MeV/n)^-1.

References

[1]

Gleeson, L. J., and Axford, W. I. “Solar modulation of galactic cosmic rays.” The Astrophysical Journal 154 (1968): 1011.

gtsimulation.particle.local_interstellar_spectrum(energy_per_nucleon, particle, model=None)[source]#

Calculate the local interstellar spectrum (LIS) of galactic cosmic rays.

Parameters:
energy_per_nucleonfloat or array_like

Kinetic energy per nucleon in MeV; for electrons and positrons, the kinetic energy.

particleParticle or str

Particle object or name. Isotopes share the LIS of their element.

model{‘Boschini2020’, ‘Bisschoff2019’, ‘CustomFit’} or None, optional

LIS model. By default, ‘Bisschoff2019’ for electrons and positrons, ‘CustomFit’ for antiprotons, and ‘Boschini2020’ for nuclei.

Returns:
float or numpy.ndarray

Differential intensity in (m2 s sr MeV/n)^-1.

Notes

  • ‘Boschini2020’: numerical tables for H-Ni [1] from 1 MeV/n to ~100-500 TeV/n, interpolated in the log-log scale.

  • ‘Bisschoff2019’: analytical expressions for e-, e+, H, He, B, C, and O [2], given for 3 MeV/n to 100 GeV/n.

  • ‘CustomFit’: unpublished analytical fit for e-, e+, antiprotons, H-Si, and Fe.

Outside these energy ranges, the LIS is extrapolated (‘Boschini2020’ as a power law).

References

[1]

Boschini, M. J., et al. “Inference of the local interstellar spectra of cosmic-ray nuclei Z <= 28 with the GalProp-HelMod framework.” The Astrophysical Journal Supplement Series 250.2 (2020): 27.

[2]

Bisschoff, D., Potgieter, M. S., and Aslam, O. P. M. “New very local interstellar spectra for electrons, positrons, protons, and light cosmic-ray nuclei.” The Astrophysical Journal 878.1 (2019): 59.

Modules