API Reference

Colliderscope contains a small library of routines and data structures to produce interactive HTML displays on particle physics data.

Producing figures

Functions which output visualisations.

colliderscope.shower_dag(output: str | Path, ...) IFrame | None

HTML visualisation of a full event history as a directed acyclic graph (DAG).

colliderscope.eta_phi_scatter(pmu, ...) PlotlyFigure

Produces a scatter plot of particles over the \(\eta-\phi\), ie. pseudorapidity-azimuth, plane.

colliderscope.eta_phi_network(pmu, ...) PlotlyFigure

Produces a Plotly figure which calculates interparticle distance, and connects particles in a network visualisation when they are within radius of each other.

colliderscope.histogram_barchart(hist, ...) PlotlyFigure

Automatically convert a Histogram object, and optionally a number of overlays, into a plotly bar chart / histogram.

Data structures

Data structures to represent styles and plottable data.

class colliderscope.Color

Data type for representing colors.

class colliderscope.NodePdgs(NamedTuple)

NamedTuple for holding the PDG names of the incoming and outgoing particles at a given interaction vertex. These are stored in list objects, and so may be mutated.

class colliderscope.Histogram

Constant memory histogram data structure.

Helper functions

Convenience functions to make producing plots easier.

colliderscope.color_range(start: Color, ...) tuple[Color, ...]

Construct a tuple of Color objects which interpolate smoothly between start and stop in size steps.

colliderscope.breit_wigner_pdf(...) ndarray[Any, dtype[float64]]

Produces the non-relativistic Breit-Wigner probability density function for a particle of given width and mass_centre.

colliderscope.hist_to_bw_params(hist) tuple[float, float]

Parameters which fit a Breit-Wigner distribution to the passed Histogram.


Last update: Jun 27, 2025