Nucleitools

Module to convert paticle ID, charge and mass number of particles in all ways.

Tools for calculating nuclei properties

class nucleitools.Charge2Mass(charge)[source]

Bases: object

Convert the charge of a cosmic ray to it’s mass by different assumptions

double()[source]

Simple approach of mass = 2 * Z

empiric()[source]

A = Z * (2 + a_c / (2 a_a) * A**(2/3)) [https: // en.wikipedia.org / wiki / Semi - empirical_mass_formula] with a_c = 0.714 and aa = 23.2 Inverse approximation: A(Z) = 2 * Z + a * Z**b with a=0.0200 and b = 1.748

stable()[source]

Using uniform distribution within all stable mass numbers of a certain charge number

class nucleitools.Mass2Charge(mass)[source]

Bases: object

Convert the mass of a cosmic ray to it’s charge by different assumptions

double()[source]

Simple approach of charge: Z = A / 2

empiric()[source]

A = Z * (2 + a_c / (2 a_a) * A**(2/3)) [https: // en.wikipedia.org / wiki / Semi - empirical_mass_formula] with a_c = 0.714 and a_a = 23.2

stable()[source]

Using uniform distribution within all possible stable charges of a certain mass number (can not deal with float inputs and unstable A = 5, 8)

nucleitools.id2a(pid)[source]

Given a nucleus ID (2006 PDG standard), returns the mass number.

Parameters

pid – nucleus ID

Returns

mass number

nucleitools.id2z(pid)[source]

Given a nucleus ID (2006 PDG standard), returns the charge number.

Parameters

pid – nucleus ID

Returns

charge number

nucleitools.iter_loadtxt(filename, delimiter='\t', skiprows=0, dtype=<class 'float'>, unpack=False)[source]

Lightweight loading function for large tabulated data files in ASCII format. Memory requirement is greatly reduced compared to np.genfromtxt and np.loadtxt.

nucleitools.nucleus2id(mass, charge)[source]

Given a mass and charge number, returns the nucleus ID (2006 PDG standard).

Parameters
  • mass – mass number

  • charge – charge number

Returns

nucleus ID