Interactive examples

This page exposes some of the functionality of the expertsystem as online utilities.

Particle database

The load_pdg function creates a ParticleCollection instance 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.

from expertsystem import io
pdg = 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

The filter function can perform any type of search. For available search properties, have a look at properties of Particle class. For more info on the search syntax, read more about lambda functions in Python.