misc (MCEq.misc)#

Different helper functions.

Reference/API#

MCEq.misc Module#

Functions#

average_A_target([mat])

Average target mass number.

caller_name([skip])

Get a name of a caller in the format module.class.method

corsikaid2pdg(corsika_id)

Conversion of CORSIKA nuclear code to PDG nuclear code

gen_xmat(energy_grid)

Generates x_lab matrix for a given energy grid

getAZN(pdg_id)

Returns mass number \(A\), charge \(Z\) and neutron number \(N\) of pdg_id.

getAZN_corsika(corsikaid)

Returns mass number \(A\), charge \(Z\) and neutron number \(N\) of corsikaid.

info(min_dbg_level, *message, **kwargs)

Print to console if min_debug_level <= config.debug_level

is_charm_pdgid(pdgid)

Returns True if particle ID belongs to a heavy (charm) hadron.

namedtuple(typename, field_names, *[, ...])

Returns a new subclass of tuple with named fields.

normalize_hadronic_model_name(name)

Converts a hadronic model name into a standard form.

pdg2corsikaid(pdg_id)

Conversion from nuclear PDG ID to CORSIKA ID.

print_in_rows(min_dbg_level, str_list[, n_cols])

Prints contents of a list in rows n_cols entries per row.

theta_deg(cos_theta)

Converts \(\cos{\theta}\) to \(\theta\) in degrees.

Classes#

energy_grid(c, b, w, d)

Energy grid (centers, bind widths, dimension)

Class Inheritance Diagram#

Inheritance diagram of MCEq.misc.energy_grid