Interactive examples¶
This page exposes some of the functionality of the expertsystem
as online
utilities.
Quantum number search¶
The load_pdg
function creates a ParticleCollection
containing the latest
PDG info. Its find
and filter
methods allows you to quickly look up the quantum numbers of a particle and,
vice versa, look up particle candidates based on a set of quantum numbers.
import expertsystem as es
pdg = es.io.load_pdg()
pdg.find(22) # by PID
pdg.find("Delta(1920)++") # by name
subset = pdg.filter(
lambda p:
p.spin in [2.5, 3.5, 4.5]
and p.name.startswith("N")
)
subset.names
Check allowed reactions¶
The expertsystem
can be used to check
whether a transition
between an initial and final state is valid. If a solution is allowed, the
check
returns a set
of names of the allowed intermediate states,
if not, it will raise a ValueError
containing the violated conservation
rules:
import expertsystem as es
es.check_reaction(
initial_state="pi0",
final_state=["gamma", "gamma", "gamma"],
allowed_interactions="EM",
)
Investigate intermediate resonances¶
The expertsystem
is designed to be a tool when doing Partial Wave Analysis.
It’s main features are therefore the generate_transitions
and
generate_amplitudes
functions. Here’s a small applet with which to visualize
these transitions online:
import expertsystem as es
from graphviz import Source
result = es.generate_transitions(
initial_state=("J/psi(1S)", [-1, +1]),
final_state=["K0", "Sigma+", "p~"],
allowed_interaction_types="strong",
)
graphs = result.collapse_graphs()
Source(es.io.convert_to_dot(graphs))