Project Info
Installation
Download
Prerequisites
Build and Installation Variants
Installation in system path
Installation in python virtualenv
CMake flags
Notes for Specific Operating Systems
Debian / Ubuntu
Fedora/CentOS/RHEL
Mac OS X
Changelog
CRPropa vNext
Bug fixes:
New features:
Interface changes:
Features that are deprecated and will be removed after this release
New plugins and resources linked on the webpages:
CRPropa 3.2
Bug fixes:
New features:
Interface changes:
Features that are deprecated and will be removed after this release
New plugins and resources linked on the webpages:
CRPropa 3.1.7
Bug fixes:
New features:
Interface change:
Features that are deprecated and will be removed after this release:
CRPropa v3.1.6
Bug fixes:
New features:
CRPropa v3.1.5
Bug fixes:
New features:
Features that are deprecated and will be removed after this release:
New plugins and resources linked on the webpages:
FAQ
I have an installation issue…
How to specify the seed for the random number generator?
How to define source positions from a matter density grid?
How to use version tracking of a python steering card?
I did not find an answer to my question…
How to cite CRPropa
Core Components
External Models
Galactic Magnetic Field
Extragalactic Magnetic Field
Photon Backgrounds
USAGE
Basic Concepts
Modular design
Parallelization/Multiprocessing
Unit system
Particle ID
Reference Counting
Modules
Propagation modules
Interaction modules
Conditional modules
Observers
Output modules
Other modules
Introduction to Python Steering
Simulation setup
Propagating a single particle
Defining an observer
Defining the output file
Defining the source
Running the simulation
(Optional) Plotting
Extragalactic Propagation
1D simulation
Simulation Setup
(Optional) Plotting
4D Simulation
Simulation setup
Periodic boundaries
Source positions
Note:
3D trajectories in a turbulent field
Saving and loading fields
Running the simulation
(Optional) Plotting
3D MHD models
Supplied data
Note:
Source settings
Observer
ModuleList
Photon Propagation
Setting up the simulation
Plotting results (optional)
Photon Propagation
(Optional) plotting of the results
Photon Propagation outside of CRPropa with EleCa and DINT
Propagation with EleCa
Propagation with DINT
Combined Propagation
(Optional) Plotting of Results
Example with secondary neutrinos
Plotting the neutrino energy distribution
Electromagnetic cascade example
Plotting
The targeting algorithm of CRPropa
A simple example on how to use the targeting algorithm of CRPropa
Plotting of the results
A learning algorithm to obtain optimal values for mu and kappa
Testing sampling results
Propagation of Extragalactic CR in the Milky Way
Galactic backtracking
Backtracking a single cosmic ray
Backtracking including uncertainties
(Optional) Plotting
Backtracking to Generate a Lens
Galactic Lensing of Simulated Cosmic Rays
Input Results from Extragalactic Simulation
Plot Maps
Apply Galactic Lenses
Generate Particles from Map
Galactic Lensing of Maps
Galactic Lensing - confirm Liouville
Lambert’s distribution
Galactic Cosmic Rays
Galactic trajectories
3D trajectory plot
Diffusion of Cosmic Rays
Diffusion Validation I
This notebook simulates a diffusion process in a homogeneous background magnetic field. The diffusion tensor is anisotropic, meaning the parallel component is larger than the perpendicular component (
\(\kappa_\parallel = 10\cdot\kappa_\perp\)
).
Distribution in x, y and z
Use the absolute distance from origin
\(|x|, |y|, |z|\)
and compare to analytical expectations.
Calculate the pValue of the
\(\chi^2\)
-test to prove the visual statement from above.
Diffusion Validation II
This notebbok simulates a diffusion process in a homogenous background magnetic field. The diffusion tensor is anisotropic, meaning the parallel component is larger than the perpendicular component (
\(\kappa_\parallel = 10\cdot\kappa_\perp\)
). Additionally, a wind in a perpendicular direction is included.
Anderson Darling Test
Calculate the mean and variance
Advection and Adiabatic Energy Changes
Adiabatic Cooling
Example
Example of diffusion in the Milky way
Example for Galactic Propagation
import of packages
Simulation
Analysis
Gas Densities
First example code for use of densities
Customize a density with different density models
Example for the implemented massdistributions of the Milky Way
Model Ferrière
Model Cordes
Model Nakanishi
Advanced use of DensityList
Example of grid based densities of the Milky Way and sampling source position
load grid
convert grid into a CRPropa mass distribution
use a massdistribution as indicator for the spacial source distribution
Acceleration
Second Order Fermi Acceleration
First Order Fermi Acceleration
Interfacing User Code
Implementing additional Modules and Features using Python only
Manual Simulation Processing
Plugins: Integrate Custom C++ Code to CRPropa’s Python Steering
Custom Observer
Custom Photon Fields
Introduction
Downloading CRPropa-data
1. Create a python class with your custom photon field (CRPropa-data)
Warning
2. Create tables for all photon field dependent processes
3. Copy files to the share folder
4. Implementing custom PhotonField in CRPropa
5. Check implementation
6. Limitation
Using CRPropa from C++
Comparison of Propagation Modules (BP - CK)
Analytic Solution
Helper Functions
Run Simulation
Load Simulation Data
Compare the Propagation in the Perpendicular Plane
Compare the Propagation in the Parallel Direction
Conservation of Momentum
Comparison with 3D Analytic Solution
Comparison of Simulation Time
Turbulent Magnetic Field
Time Comparison for Galactic Trajectories
Additional Resources
API
Building Blocks
Core Classes
Physics Definitions
Propagation Modules
Energy Losses
Magnetic Fields
Observer
Condition
Source Features
Output
Magnetic Lenses
Tools
Photon Fields
Library API
Class Hierarchy
File Hierarchy
Full API
Namespaces
Namespace crpropa
Namespace eleca
Namespace quimby
Namespace std
Classes and Structs
Struct _Secondary
Struct CLOCK_TLS_ITEM
Struct HDF5Output::OutputRow
Struct NuclearDecay::DecayMode
Struct NuclearMassTable
Struct Output::Property
Struct PerformanceModule::_module_info
Struct PhotoDisintegration::Branch
Struct PhotoDisintegration::PhotonEmission
Struct RANDOM_TLS_ITEM
Struct SophiaEventOutput
Struct SourceGenericComposition::Nucleus
Class AbstractAccelerationModule
Class AbstractCondition
Class AdiabaticCooling
Class AdvectionField
Class AdvectionFieldList
Class AMRMagneticField
Class ArchimedeanSpiralField
Class Base64
Class BlackbodyPhotonField
Class Candidate
Class Clock
Class Clock::Impl
Class CMB
Class CMZField
Class ConstantDensity
Class ConstantSphericalAdvectionField
Class Cordes
Class Cosmology
Class CubicBoundary
Class CylindricalBoundary
Class CylindricalProjectionMap
Class Density
Class DensityGrid
Class DensityList
Class DetectionLength
Class DiffusionSDE
Class DirectedFlowOfScatterCenters
Class DirectedFlowScattering
Class ElasticScattering
Class ElectronPairProduction
Class EllipsoidalBoundary
Class EMCascade
Class EMDoublePairProduction
Class EMInverseComptonScattering
Class EmissionMap
Class EmissionMapFiller
Class EMPairProduction
Class EMTripletPairProduction
Class Ferriere
Class FutureRedshift
Template Class Grid
Class GridProperties
Class GridTurbulence
Class HDF5Output
Class HelicalGridTurbulence
Class ICSSecondariesEnergyDistribution
Class IRB_Dominguez11
Class IRB_Finke10
Class IRB_Franceschini08
Class IRB_Gilmore12
Class IRB_Kneiske04
Class IRB_Stecker05
Class IRB_Stecker16_lower
Class IRB_Stecker16_upper
Class JF12Field
Class JF12FieldSolenoidal
Class LensPart
Class LogarithmicSpiralField
Class MagneticDipoleField
Class MagneticField
Class MagneticFieldEvolution
Class MagneticFieldGrid
Class MagneticFieldList
Class MagneticLens
Class MaximumTrajectoryLength
Class MinimumChargeNumber
Class MinimumEnergy
Class MinimumEnergyPerParticleId
Class MinimumRedshift
Class MinimumRigidity
Class ModulatedMagneticFieldGrid
Class Module
Class ModuleList
Class ModuleListRunner
Class Nakanishi
Class NuclearDecay
Class Observer
Class Observer1D
Class ObserverDetectAll
Class ObserverElectronVeto
Class ObserverFeature
Class ObserverInactiveVeto
Class ObserverNeutrinoVeto
Class ObserverNucleusVeto
Class ObserverParticleIdVeto
Class ObserverPhotonVeto
Class ObserverPoint
Class ObserverRedshiftWindow
Class ObserverSurface
Class ObserverTimeEvolution
Class ObserverTracking
Class Output
Class ParaxialBox
Class ParticleCollector
Class ParticleFilter
Class ParticleMapsContainer
Class ParticleState
Class PerformanceModule
Class PeriodicBox
Class PeriodicMagneticField
Class PhotoDisintegration
Class PhotonEleCa
Class PhotonField
Class PhotonOutput1D
Class PhotoPionProduction
Class Pixelization
Class PlanckJF12bField
Class Plane
Class PlaneWaveTurbulence
Class PolarizedSingleModeMagneticField
Class PPSecondariesEnergyDistribution
Class PropagationBP
Class PropagationBP::Y
Class PropagationCK
Class PropagationCK::Y
Class PT11Field
Class QuimbyMagneticField
Class QuimbyMagneticFieldAdapter
Class Random
Class Redshift
Template Class ref_ptr
Class Referenced
Class ReflectiveBox
Class RenormalizeMagneticField
Class RestrictToRegion
Class SecondOrderFermi
Class ShellOutput
Class ShellOutput1D
Class ShellPropertyOutput
Class SimpleGridTurbulence
Class SimplePropagation
Class SimpleTurbulenceSpectrum
Class Source
Class SourceComposition
Class SourceDensityGrid
Class SourceDensityGrid1D
Class SourceDirectedEmission
Class SourceDirection
Class SourceEmissionCone
Class SourceEmissionMap
Class SourceEnergy
Class SourceFeature
Class SourceGenericComposition
Class SourceInterface
Class SourceIsotropicEmission
Class SourceLambertDistributionOnSphere
Class SourceList
Class SourceMassDistribution
Class SourceMultipleParticleTypes
Class SourceMultiplePositions
Class SourceParticleType
Class SourcePosition
Class SourcePowerLawSpectrum
Class SourcePulsarDistribution
Class SourceRedshift
Class SourceRedshift1D
Class SourceRedshiftEvolution
Class SourceSNRDistribution
Class SourceTag
Class SourceUniform1D
Class SourceUniformBox
Class SourceUniformCylinder
Class SourceUniformHollowSphere
Class SourceUniformRedshift
Class SourceUniformShell
Class SourceUniformSphere
Class Sphere
Class SphericalAdvectionField
Class SphericalAdvectionShock
Class SphericalBoundary
Class StepLengthModifier
Class Surface
Class SynchrotronRadiation
Class TabularPhotonField
Class TextOutput
Class TF17Field
Class ToroidalHaloField
Class TurbulenceSpectrum
Class TurbulentField
Class UniformAdvectionField
Class UniformMagneticField
Class URB_Fixsen11
Class URB_Nitu21
Class URB_Protheroe96
Class Variant
Class Variant::bad_conversion
Template Class Vector3
Class ParticleSplitting
Class QuasiLinearTheory
Class URB
Enums
Enum DetectionState
Enum interpolationType
Enum TF17DiskModel
Enum TF17HaloModel
Functions
Function crpropa::__attribute__
Function crpropa::__declspec
Function crpropa::_ParticlesAtGroundSortPredicate
Function crpropa::_SecondarySortPredicate
Function crpropa::chargeNumber
Template Function crpropa::clip
Function crpropa::closestIndex
Function crpropa::comoving2LightTravelDistance
Function crpropa::comovingDistance2Redshift
Template Function crpropa::const_pointer_cast
Function crpropa::convertIdToName
Function crpropa::deserialize
Function crpropa::digit
Function crpropa::DintElecaPropagation
Function crpropa::DintPropagation
Function crpropa::dumpGrid(ref_ptr<Grid3f>, std::string, double)
Function crpropa::dumpGrid(ref_ptr<Grid1f>, std::string, double)
Function crpropa::dumpGridToTxt(ref_ptr<Grid3f>, std::string, double)
Function crpropa::dumpGridToTxt(ref_ptr<Grid1f>, std::string, double)
Template Function crpropa::dynamic_pointer_cast
Function crpropa::ElecaPropagation
Function crpropa::FillInSpectrum
Function crpropa::fromMagneticField
Function crpropa::fromMagneticFieldStrength
Template Function crpropa::gaussInt
Template Function crpropa::get_pointer
Function crpropa::getDataPath
Function crpropa::getInstallPrefix
Function crpropa::gridPowerSpectrum
Function crpropa::H0
Function crpropa::hsum_double_avx
Function crpropa::hubbleRate
Function crpropa::initHelicalTurbulence
Function crpropa::initTurbulence
Function crpropa::INT_FUNCTION(TYPE_CHAR, toChar, char)
Function crpropa::INT_FUNCTION(TYPE_INT16, toInt16, int16_t)
Function crpropa::INT_FUNCTION(TYPE_INT32, toInt32, int32_t)
Function crpropa::INT_FUNCTION(TYPE_INT64, toInt64, int64_t)
Function crpropa::interpolate
Function crpropa::interpolate2d
Function crpropa::interpolateEquidistant
Function crpropa::intrusive_ptr_add_ref
Function crpropa::intrusive_ptr_release
Function crpropa::isNucleus
Function crpropa::lightTravel2ComovingDistance
Function crpropa::lightTravelDistance2Redshift
Function crpropa::loadGrid(ref_ptr<Grid3f>, std::string, double)
Function crpropa::loadGrid(ref_ptr<Grid1f>, std::string, double)
Function crpropa::loadGridFromTxt(ref_ptr<Grid3f>, std::string, double)
Function crpropa::loadGridFromTxt(ref_ptr<Grid1f>, std::string, double)
Function crpropa::luminosityDistance2Redshift
Function crpropa::massNumber
Function crpropa::maximumOfSumsOfColumns
Function crpropa::meanFieldStrength(ref_ptr<Grid1f>)
Function crpropa::meanFieldStrength(ref_ptr<Grid3f>)
Function crpropa::meanFieldVector
Function crpropa::norm_1
Function crpropa::normalizeColumns
Function crpropa::normalizeMatrix
Function crpropa::nuclearMass(int)
Function crpropa::nuclearMass(int, int)
Function crpropa::nucleusId
Function crpropa::omegaL
Function crpropa::omegaM
Template Function crpropa::operator*
Function crpropa::operator<<(std::ostream&, const Variant&)
Template Function crpropa::operator<<(std::ostream&, const Vector3<T>&)
Function crpropa::operator<<(std::ostream&, const Random&)
Template Function crpropa::operator>>(std::istream&, Vector3<T>&)
Function crpropa::operator>>(std::istream&, Random&)
Function crpropa::periodicBoundary
Function crpropa::periodicClamp
Template Function crpropa::pow_integer
Specialized Template Function crpropa::pow_integer< 0 >
Function crpropa::prod_up
Function crpropa::redshift2ComovingDistance
Function crpropa::redshift2LightTravelDistance
Function crpropa::redshift2LuminosityDistance
Function crpropa::reflectiveBoundary
Function crpropa::reflectiveClamp
Function crpropa::rmsFieldStrength(ref_ptr<Grid1f>)
Function crpropa::rmsFieldStrength(ref_ptr<Grid3f>)
Function crpropa::rmsFieldStrengthPerAxis
Function crpropa::round
Function crpropa::scaleGrid(ref_ptr<Grid1f>, double)
Function crpropa::scaleGrid(ref_ptr<Grid3f>, double)
Function crpropa::serialize
Function crpropa::setCosmologyParameters
Template Function crpropa::static_pointer_cast
Template Function crpropa::swap
Function crpropa::turbulentCorrelationLength
Function crpropa::VARIANT_TO_DECL(Bool, bool)
Function crpropa::VARIANT_TO_DECL(UChar, unsigned char)
Function crpropa::VARIANT_TO_DECL(UInt16, uint16_t)
Function crpropa::VARIANT_TO_DECL(UInt32, uint32_t)
Function crpropa::VARIANT_TO_DECL(UInt64, uint64_t)
Function crpropa::VARIANT_TO_DECL(String, std::string)
Function crpropa::variantTypeToH5T_NATIVE
Function declare_version
Function logDebug
Function logError
Function logInfo
Function logWarning
Function setLogLevel
Function setLogStream
Variables
Variable a
Variable b
Variable bs
Variable BUFFER_SIZE
Variable crpropa::_nOrder_max
Variable crpropa::_nPix
Variable crpropa::_random
Variable crpropa::alpha_finestructure
Variable crpropa::ampere
Variable crpropa::amu
Variable crpropa::atto
Variable crpropa::au
Variable crpropa::barn
Variable crpropa::c_light
Variable crpropa::c_squared
Variable crpropa::cash_karp_a
Variable crpropa::cash_karp_b
Variable crpropa::cash_karp_bs
Variable crpropa::ccm
Variable crpropa::centimeter
Variable crpropa::cm
Variable crpropa::cosmology
Variable crpropa::coulomb
Variable crpropa::decode_alphabet
Variable crpropa::deg
Variable crpropa::EeV
Variable crpropa::electronvolt
Variable crpropa::encode_alphabet
Variable crpropa::eplus
Variable crpropa::epsilon0
Variable crpropa::erg
Variable crpropa::eV
Variable crpropa::exa
Variable crpropa::exaelectronvolt
Variable crpropa::femto
Variable crpropa::gauss
Variable crpropa::GeV
Variable crpropa::giga
Variable crpropa::gigaelectronvolt
Variable crpropa::gigaparsec
Variable crpropa::Gpc
Variable crpropa::h_planck
Variable crpropa::hertz
Variable crpropa::hour
Variable crpropa::joule
Variable crpropa::k_boltzmann
Variable crpropa::kelvin
Variable crpropa::keV
Variable crpropa::kilo
Variable crpropa::kiloelectronvolt
Variable crpropa::kilogram
Variable crpropa::kilometer
Variable crpropa::kiloparsec
Variable crpropa::km
Variable crpropa::kpc
Variable crpropa::ly
Variable crpropa::mass_electron
Variable crpropa::mass_neutron
Variable crpropa::mass_proton
Variable crpropa::MAX_THREAD
Variable crpropa::MAX_THREAD
Variable crpropa::mec2
Variable crpropa::mec2
Variable crpropa::mec2
Variable crpropa::mega
Variable crpropa::megaelectronvolt
Variable crpropa::megaparsec
Variable crpropa::meter
Variable crpropa::MeV
Variable crpropa::micro
Variable crpropa::microgauss
Variable crpropa::microsecond
Variable crpropa::milli
Variable crpropa::millisecond
Variable crpropa::minute
Variable crpropa::mol
Variable crpropa::Mpc
Variable crpropa::ms
Variable crpropa::mu0
Variable crpropa::muG
Variable crpropa::mus
Variable crpropa::nano
Variable crpropa::nanogauss
Variable crpropa::nanosecond
Variable crpropa::newton
Variable crpropa::nG
Variable crpropa::ns
Variable crpropa::nuclearMassTable
Variable crpropa::parsec
Variable crpropa::pascal
Variable crpropa::pc
Variable crpropa::peta
Variable crpropa::petaelectronvolt
Variable crpropa::PeV
Variable crpropa::pico
Variable crpropa::propertyBufferSize
Variable crpropa::rad
Variable crpropa::radius_electron
Variable crpropa::sec
Variable crpropa::second
Variable crpropa::sigma_thomson
Variable crpropa::tera
Variable crpropa::teraelectronvolt
Variable crpropa::tesla
Variable crpropa::TeV
Variable crpropa::toUChar
Variable crpropa::toUInt16
Variable crpropa::toUInt32
Variable crpropa::toUInt64
Variable crpropa::volt
Variable crpropa::W
Variable crpropa::X
Variable crpropa::yocto
Variable crpropa::yotta
Variable crpropa::zepto
Variable crpropa::zetta
Variable g_GIT_DESC
Variable g_GIT_REFSPEC
Variable g_GIT_SHA1
Variable RANK
Typedefs
Typedef crpropa::_Secondary
Typedef crpropa::const_LensPartIter
Typedef crpropa::Grid1d
Typedef crpropa::Grid1f
Typedef crpropa::Grid3d
Typedef crpropa::Grid3f
Typedef crpropa::LensPartIter
Typedef crpropa::ModelMatrixType
Typedef crpropa::ModelVectorType
Typedef crpropa::Vector3d
Typedef crpropa::Vector3f
DEVEL
GNU Debugger (GDB)
Profiling
Simple example
Profile CRPropa
References
Code Coverage
Verify the Data Files Integrity
CRPropa3
»
Library API
»
Struct _Secondary
Struct _Secondary
Defined in
File PhotonPropagation.cpp
Struct Documentation
struct
_Secondary
Public Members
double
D
double
E
double
E0
double
E1
double
X1
int
ID
int
ID0
int
ID1