config (MCEq.config)#

These are all options MCEq accepts. Usually there is no need to change, except for advanced scenarios. Check out the file for a better formatted description and some advanced settings not contained in the list below.

Reference/API#

MCEq.config Module#

Functions#

ensure_db_available()

Download the MCEq database if not already present.

set_mkl_threads(nthreads)

Classes#

FileIntegrityCheck(filename[, checksum])

A class to check a file integrity against provided checksum

MCEqConfigCompatibility(namespace)

This class provides access to the attributes of the module as a dictionary, as it was in the previous versions of MCEq

Variables#

A_target

Average target mass (for interaction length calculations) Change parameter only in combination with interaction model setting.

X_start

Convert a string or number to a floating-point number, if possible.

adv_set

Advanced settings (some options might be obsolete/not working)

assume_nucleon_interactions_for_exotics

Assume nucleon, pion and kaon cross sections for interactions of rare or exotic particles (mostly relevant for non-compact mode)

average_loss_operator

Improve (explicit solver) stability by averaging the continous loss operator

base_path

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

base_url

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

config

cuda_fp_precision

CUDA Floating point precision (default 32-bit 'float')

cuda_gpu_id

Select CUDA device ID if you have multiple GPUs

dXmax

Maximal integration step dX in g/cm2.

data_dir

Directory where the data files for the calculation are stored

debug_level

Debug flag for verbose printing, 0 silences MCEq entirely

density_model

(model, (arguments))

e_max

The maximal energy is 1e12 GeV, but not all interaction models run at such high energies.

e_min

Minimal energy for grid The minimal energy (technically) is 1e-2 GeV.

em_db_fname

File name of the MCEq database

enable_cont_rad_loss

Treat radiation (bremsstrahlung) as continuous loss, disable if explicit electromagnetic cross sections available

enable_default_tracking

Enable default tracking particles, such as pi_numu, pr_mu+, etc.

enable_em

Enable electromagnetic cascade with matrices from EmCA

enable_em_ion

enable EM ionization loss for electrons and positrons

enable_energy_loss

Ionization and radiative losses according to stopping power tables (PDG)

env_density

density of default material in g/cm^3

env_name

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

excpt_on_missing_particle

Raise exception when requesting unknown particles from get_solution

fallback_to_air_cs

Fall-back to air production matrices if medium not included in data file

file_checksum

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

floatlen

Floating point precision (is set automatically)

generic_losses_all_charged

Apply stopping power to all charged hadrons (muon dEdX is used and is ~ok)

h_atm

Convert a string or number to a floating-point number, if possible.

h_obs

Convert a string or number to a floating-point number, if possible.

has_accelerate

bool(x) -> bool

has_cuda

bool(x) -> bool

has_mkl

bool(x) -> bool

hybrid_crossover

Ratio of decay_length/interaction_length where particle interactions are neglected and the resonance approximation is used 0.5 ~ precision loss <+3% speed gain ~ factor 10 If smoothness and shape accuracy for prompt flux is crucial, use smaller values around 0.1 or 0.05

integrator

Selection of integrator (euler/odepack)

interaction_medium

Material for interaction lengths, ionization and radiation (=continuous) loss terms Currently available choices: 'air', 'water', 'ice', 'rock', 'co2', 'hydrogen', 'iron'

kernel_config

euler kernel implementation (numpy/MKL/CUDA/accelerate).

leading_process

The leading process is can be either "decays" or "interactions".

len_target

Default parameters for GeneralizedTarget Total length of the target [m]

loss_step_for_average

Step size (dX) for averaging

low_energy_extension

This is not used in the code as before, instead the low energy extension is compiled into the HDF backend files.

max_density

Approximate value for the maximum density expected.

mceq_db_fname

File name of the MCEq database

minimal_primary_energy

Convert a string or number to a floating-point number, if possible.

mkl

mkl_libs

Built-in mutable sequence.

mkl_path

Path subclass for non-Windows systems.

mkl_threads

Number of MKL threads (for sparse matrix multiplication the performance advantage from using more than a few threads is limited by memory bandwidth) Irrelevant for GPU integrators, but can affect initialization speed if numpy is linked to MKL.

muon_helicity_dependence

Helicity dependent muons decays from analytical expressions

ode_params

parameters for the odepack integrator.

override_debug_fcn

Override debug prinput for functions listed here (just give the name, "get_solution" for instance) Warning, this option slows down initialization by a lot.

override_max_level

Override debug printout for debug levels < value for the functions above

pf

Autodetect best solver determine shared library extension and MKL path

prefix

Path subclass for non-Windows systems.

print_module

Print module name in debug output

prompt_ctau

Convert a string or number to a floating-point number, if possible.

r_E

parameters for EarthGeometry

release_tag

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

return_as

The latest versions of MCEq work in kinetic energy not total energy If you want the result to be compatible with the previous choose 'total energy' else 'kinetic energy'

stability_margin

Stability margin for the integrator.

standard_particles

Particles for compact mode

use_isospin_sym

When using modified particle production matrices use isospin symmetries to determine the corresponding modification for neutrons and K0L/K0S

Class Inheritance Diagram#

Inheritance diagram of MCEq.config.FileIntegrityCheck, MCEq.config.MCEqConfigCompatibility