data

A collection of data containers.

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 Particle(name: str, pid: int, state: expertsystem.data.QuantumState[float][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 ComplexEnergyState(energy: complex, state: expertsystem.data.QuantumState[expertsystem.data.Spin][expertsystem.data.Spin])[source]

Bases: expertsystem.data.ComplexEnergy

Pole in the complex energy plane, with quantum numbers.

class QuantumState(spin: _T, charge: int = 0, isospin: Optional[expertsystem.data.Spin] = None, strangeness: int = 0, charmness: int = 0, bottomness: int = 0, topness: int = 0, baryon_number: int = 0, electron_lepton_number: int = 0, muon_lepton_number: int = 0, tau_lepton_number: int = 0, parity: Optional[expertsystem.data.Parity] = None, c_parity: Optional[expertsystem.data.Parity] = None, g_parity: Optional[expertsystem.data.Parity] = None)[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)
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 = None
strangeness: int = 0
tau_lepton_number: int = 0
topness: int = 0
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 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
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