Jet Visualisation Documentation

Documentation for visualisation interfaces extension module.

Plotting and Animation

illustration

To visualise the clustered jets as a 3d bar plot (see illustration above) Makie.jl is used. See the jetsplot function in ext/JetVisualisation.jl and its documentation for more. There are two worked examples in the examples directory of this package.

The plotting code is a package extension and will load if the one of the Makie modules is loaded in the environment.

The animatereco function will animate the reconstruction sequence, given a ClusterSequence object. See the function documentation below for the many options that can be customised.

Function Index

Jet Visualisation Public Interfaces

JetReconstruction.animaterecoMethod
animatereco(cs::ClusterSequence, filename;
            barsize_phi = 0.1,
            barsize_y = 0.1,
            colormap = :glasbey_category10_n256,
            perspective = 0.5,
            azimuth = 2.7,
            elevation = 0.5,
            framerate = 5,
            ancestors = false,
            Module = Makie)

Animate the jet reconstruction process and save it as a video file.

Arguments

  • cs::ClusterSequence: The cluster sequence object containing the jets.
  • filename: The name of the output video file.

Optional Arguments

  • barsize_phi=0.1: The size of the bars in the phi direction.
  • barsize_y=0.1: The size of the bars in the y direction.
  • colormap=:glasbey_category10_n256: The colormap to use for coloring the jets.
  • perspective=0.5: The perspective of the plot.
  • azimuth=2.7: The azimuth angle of the plot.
  • elevation=0.5: The elevation angle of the plot.
  • framerate=5: The framerate of the output video.
  • end_frames=0: The number of static frames to show at the end of the animation. This can be useful to show the final state of the jets for a longer time.
  • title=nothing: The title to add to the plot.
  • ancestors=false: Whether to include ancestors of the jets in the animation. When true the ancestors of the jets will be plotted as well, as height zero bars, with the same colour as the jet they are ancestors of.
  • Module: The plotting module to use. Default is Makie.

For perspective, azimuth, and elevation, a single value can be passed for a fixed viewpoint, or a tuple of two values for a changing viewpoint. The viewpoint will then change linearly between the two values over the course of the animation.

Returns

  • fig: The figure object representing the final frame.
source
JetReconstruction.jetsplotMethod
jetsplot(objects, idx_arrays; barsize_phi=0.1, barsize_eta=0.1, colormap=:glasbey_hv_n256, Module=Main)

Plots a 3d bar chart that represents jets. Takes an objects array of objects to display and idx_arrays, an array of arrays with indices, where idx_arrays[i] gives indices of objects that form the jet number i. This function's signature might not be the most practical for the current version of the JetReconstruction.jl package, as it has been written during the early stage of development. There is now an overload of it that takes a ClusterSequence object as its argument.

Optional arguments: barsize_phi::Real — width of a bar along the ϕ axis; barsize_eta::Real — width of a bar along the η axis; colormap::Symbol — Makie colour map; Module — the module where you have your Makie (see below);

# example
using CairoMakie # use any other Makie that you have here

jetsplot([object1, object2, object3], [[1], [2, 3]])

The example above plots object1 as a separate jet in one colour and object2 and object3 together in another colour.

This function needs Makie.jl to work. You should install and import/use a specific backend yourself. jetsplot works with CairoMakie, WGLMakie, GLMakie, etc. Additionally, you can specify the module where you have your Makie explicitly:

import CairoMakie
jetsplot(my_objects, my_colour_arrays, Module=CairoMakie)

import GLMakie
jetsplot(my_objects, my_colour_arrays, Module=GLMakie)

using WGLMakie
jetsplot(my_objects, my_colour_arrays, Module=Main) #default
source
JetReconstruction.jetsplotMethod
jetsplot(objects, cs::ClusterSequence; barsize_phi=0.1, barsize_eta=0.1, colormap=:glasbey_hv_n256, Module=Main)

Plots a 3d bar chart that represents jets. Takes objects, an array of objects to display (should be the same array you have passed to jet_reconstruct to get the cs::ClusterSequence), and the cs::ClusterSequence itself as arguments.

Optional arguments: barsize_phi::Real — width of a bar along the ϕ axis; barsize_eta::Real — width of a bar along the η axis; colormap::Symbol — Makie colour map; Module — the module where you have your Makie (see below);

# example
using CairoMakie # use any other Makie that you have here
jetsplot([object1, object2, object3], cluster_sequence_I_got_from_jet_reconstruct; Module=CairoMakie)

This function needs Makie.jl to work. You should install and import/use a specific backend yourself. jetsplot works with CairoMakie, WGLMakie, GLMakie, etc. Additionally, you can specify the module where you have your Makie explicitly:

import CairoMakie
jetsplot(my_objects, cs, Module=CairoMakie)

import GLMakie
jetsplot(my_objects, cs, Module=GLMakie)

using WGLMakie
jetsplot(my_objects, cs, Module=Main) #default
source