data

A collection of data containers.

class ComplexEnergy(energy: complex)[source]

Bases: object

Defines a complex valued energy.

Resembles a position (pole) in the complex energy plane.

__eq__(other: object)bool[source]

Return self==value.

property complex_energy
property mass
property width
class ComplexEnergyState(energy: complex, state: expertsystem.data.QuantumState[expertsystem.data.Spin])[source]

Bases: expertsystem.data.ComplexEnergy

Pole in the complex energy plane, with quantum numbers.

class GellmannNishijima[source]

Bases: object

Collection of conversion methods using Gell-Mann–Nishijima.

The methods in this class use the Gell-Mann–Nishijima formula:

\[Q = I_3 + \frac{1}{2}(B+S+C+B'+T)\]

where \(Q\) is charge (computed), \(I_3\) is Spin.projection, \(B\) is baryon_number, \(S\) is strangeness, \(C\) is charmness, \(B'\) is bottomness, and \(T\) is topness.

static compute_charge(state: expertsystem.data.QuantumState) → Optional[float][source]

Compute charge using the Gell-Mann–Nishijima formula.

If isospin is not None, returns the value \(Q\): computed with the Gell-Mann–Nishijima formula.

static compute_isospin_projection(charge: float, baryon_number: float, strangeness: float, charmness: float, bottomness: float, topness: float)float[source]

Compute isospin projection using the Gell-Mann–Nishijima formula.

See compute_charge, but then computed for \(I_3\).

class Parity(value: Union[float, int, str])[source]

Bases: object

Safe, immutable data container for parity.

__eq__(other: object)bool[source]

Return self==value.

property value
class Particle(name: str, pid: int, state: expertsystem.data.QuantumState[float], mass: float, width: float = 0.0)[source]

Bases: expertsystem.data.ComplexEnergy

Immutable container of data defining a physical particle.

Can only contain info that the PDG would list.

__eq__(other: object)bool[source]

Return self==value.

property name
property pid
class ParticleCollection(particles: Optional[Dict[str, expertsystem.data.Particle]] = None)[source]

Bases: collections.abc.Mapping

Safe, dict-like collection of Particle instances.

add(particle: expertsystem.data.Particle)None[source]
find(search_term: Union[int, str])expertsystem.data.Particle[source]

Search for a particle by either name (str) or PID (int).

find_subset(search_term: Union[int, str])expertsystem.data.ParticleCollection[source]

Perform a ‘fuzzy’ search for a particle by name or PID.

Like find, but returns several results in the form of a new ParticleCollection.

items() → a set-like object providing a view on D’s items[source]
keys() → a set-like object providing a view on D’s keys[source]
merge(other: expertsystem.data.ParticleCollection)None[source]
values() → an object providing a view on D’s values[source]
class QuantumState(*args, **kwds)[source]

Bases: typing.Generic

Set of quantum numbers with a generic type spin.

This is to make spin projection required in QuantumState and unavailable in Particle.

__eq__(other)

Return self==value.

baryon_number: int = 0
bottomness: int = 0
c_parity: Optional[expertsystem.data.Parity] = None
charge: int = 0
charmness: int = 0
electron_lepton_number: int = 0
g_parity: Optional[expertsystem.data.Parity] = None
isospin: Optional[expertsystem.data.Spin] = None
muon_lepton_number: int = 0
parity: Optional[expertsystem.data.Parity] = None
spin: _T
strangeness: int = 0
tau_lepton_number: int = 0
topness: int = 0
class Spin(magnitude: float, projection: float)[source]

Bases: collections.abc.Hashable

Safe, immutable data container for spin with projection.

__eq__(other: object)bool[source]

Return self==value.

property magnitude
property projection
create_antiparticle(template_particle: expertsystem.data.Particle, new_name: str = None)expertsystem.data.Particle[source]
create_particle(template_particle: expertsystem.data.Particle, name: Optional[str] = None, pid: Optional[int] = None, mass: Optional[float] = None, width: Optional[float] = None, charge: Optional[int] = None, spin: Optional[float] = None, isospin: Optional[expertsystem.data.Spin] = None, strangeness: Optional[int] = None, charmness: Optional[int] = None, bottomness: Optional[int] = None, topness: Optional[int] = None, baryon_number: Optional[int] = None, electron_lepton_number: Optional[int] = None, muon_lepton_number: Optional[int] = None, tau_lepton_number: Optional[int] = None, parity: Optional[int] = None, c_parity: Optional[int] = None, g_parity: Optional[int] = None, state: Optional[expertsystem.data.QuantumState[float]] = None)expertsystem.data.Particle[source]