gondola.visual.tracker#
Tracker related plots and visualizations
Functions
|
Use lines to indicate detector strips. |
|
Create a number of 2d plots for the tracker. |
|
Plot 2d projection of the tracker on the given axis. |
|
Set up figure and axis objects for a 2d projection of tracker layers. |
- gondola.visual.tracker.plot_strip_lines(ax, det, layer: int, color='k')#
Use lines to indicate detector strips. Automatically apply correct orientation for even/odd layers.
- # Arguments:
ax : axis instance to plot on det : iterable providing x,y coordinates layer : tracker layer (0-9)
- # Keyword Arguments:
color : the color of the lines
- gondola.visual.tracker.plot_tracker_proj(ax, hits, projection='xy', use_energy=False, cmap=<matplotlib.colors.LinearSegmentedColormap object>, circle_color='w', color_energy=False, cnorm_max=None, hitstyle={'alpha': 0.5, 'edgecolor': 'w', 'marker': 'o'})#
Plot 2d projection of the tracker on the given axis. Hits can be indicated if available. Use together with "prepare_layer_fig" for a full plot with labeled axes.
- # Arguments:
ax : The axes to plot on
hits : An iterable of gondola_core.events.TrackerHit
- # Keyword Arguments:
projection : The projection to plot. Can be either "xy", "xz" or "yz"
cmap : A matplotlib compatible colormap to color the hits
- circle_colorThe color with the circle showing the detector outlines
are indicated
- color_energyColor the circles for the hits with the energy deposition
FIXME - color scale needs to be normalized together with the TOF
- cnorm_maxThe colors can be normalized. Specify a maximum for the normalization
(min will be 0)
- hitstyleSpecify the style of the plotted hits by a dictionary which will be
passed on to plt.scatter
- gondola.visual.tracker.prepare_layer_fig(layer, projection='XY')#
Set up figure and axis objects for a 2d projection of tracker layers.
This will NOT plot any detectors/hits. It will ONLY prepare the figure/axes objects with labels and such!
- # Keyword Arguments:
- projectionEither 'XY', 'XZ' or 'ZY'. Show
the tracker from the respective side
- gondola.visual.tracker.plot_tracker(hits=None, mask=None, circle_color='w') dict #
Create a number of 2d plots for the tracker. This includes individual plots for the individual layers as well as combined projections in xy, xz and yz.
- # Keyword Arguments:
- hitsA list of tracker hits. When given then
plot only those layers which have hits If None given, plot all layers (e.g. to be used with the mask argument)
mask : Indicate masked strips (grey them out)