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
radiusof each other.
- colliderscope.histogram_barchart(hist, ...) PlotlyFigure
Automatically convert a
Histogramobject, and optionally a number ofoverlays, into aplotlybar chart / histogram.
Data structures¶
Data structures to represent styles and plottable data.
- class colliderscope.Color
Data type for representing colors.
- class colliderscope.NodePdgs(NamedTuple)
NamedTuplefor holding the PDG names of the incoming and outgoing particles at a given interaction vertex. These are stored inlistobjects, 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
tupleofColorobjects which interpolate smoothly betweenstartandstopinsizesteps.
- colliderscope.breit_wigner_pdf(...) ndarray[Any, dtype[float64]]
Produces the non-relativistic Breit-Wigner probability density function for a particle of given
widthandmass_centre.
- colliderscope.hist_to_bw_params(hist) tuple[float, float]
Parameters which fit a Breit-Wigner distribution to the passed
Histogram.