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.
-
property
complex_energy
¶
-
property
mass
¶
-
property
width
¶
-
property
-
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\) isbaryon_number
, \(S\) isstrangeness
, \(C\) ischarmness
, \(B'\) isbottomness
, and \(T\) istopness
.-
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 theGell-Mann–Nishijima formula
.
-
static
-
class
Parity
(value: Union[float, int, str])[source]¶ Bases:
object
Safe, immutable data container for parity.
-
property
value
¶
-
property
-
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.
-
property
name
¶
-
property
pid
¶
-
property
-
class
ParticleCollection
(particles: Optional[Dict[str, expertsystem.data.Particle]] = None)[source]¶ Bases:
collections.abc.Mapping
Safe,
dict
-like collection ofParticle
instances.-
add
(particle: expertsystem.data.Particle) → None[source]¶
-
find
(search_term: Union[int, str]) → expertsystem.data.Particle[source]¶
-
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 newParticleCollection
.
-
merge
(other: expertsystem.data.ParticleCollection) → None[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 inParticle
.-
__eq__
(other)¶ Return self==value.
-
c_parity
: Optional[expertsystem.data.Parity] = None¶
-
g_parity
: Optional[expertsystem.data.Parity] = None¶
-
isospin
: Optional[expertsystem.data.Spin] = None¶
-
parity
: Optional[expertsystem.data.Parity] = None¶
-
spin
: _T¶
-
-
class
Spin
(magnitude: float, projection: float)[source]¶ Bases:
collections.abc.Hashable
Safe, immutable data container for spin with projection.
-
property
magnitude
¶
-
property
projection
¶
-
property
-
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]¶