workflow.py at any point in the reconstruction loop.
All plots are saved automatically to the directory specified by $LARDON_PLOT. The filename encodes the detector, run, subfile, flow/writer/server numbers, event number, and trigger number for traceability.
Common Options
Every plotting function accepts these two keyword arguments:| Option | Default | Description |
|---|---|---|
option | None | Extra string appended to the output filename (e.g. option="after_noise_filter") |
to_be_shown | False | If True, opens the plot interactively via plt.show() |
Event Displays
Event displays render the full 2-D ADC map (channel vs. time tick) for the current event and module.plot.event_display_per_daqch()
plot.event_display_per_daqch()
Renders the event display in DAQ channel ordering — the raw hardware channel numbering. Because DAQ channels can interleave views within a single module, this view can appear discontinuous.
adc_range—[min, max]ADC scale for the color map (default[-10, 10]).
ED_daqch_<module>_...png.plot.event_display_per_view()
plot.event_display_per_view()
Renders the event display in view channel ordering — channels within a single view, which gives a more natural and readable layout. Separate sub-panels are drawn for each view, with dedicated color scales for induction (diverging) and collection (sequential).
adc_ind— ADC scale for induction views (default[-10, 10]).adc_coll— ADC scale for collection views (default[-5, 30]).
ED_vch_<module>_...png.plot.event_display_per_view_roi()
plot.event_display_per_view_roi()
Same layout as Saved as
event_display_per_view(), but only the signal ROI (Region Of Interest) is shown — the noise mask is applied so that only samples flagged as signal are visible. Useful for checking ROI finding quality.ED_vch_<module>_...png.plot.event_display_per_view_noise()
plot.event_display_per_view_noise()
Same layout as Saved as
event_display_per_view(), but only the noise regions are shown — the signal ROI is masked out so that only samples flagged as background remain. Useful for verifying the noise filter.ED_vch_<module>_...png.plot.event_display_per_view_hits_found()
plot.event_display_per_view_hits_found()
Same layout as Saved as
event_display_per_view(), but overlays rectangles for every found hit on top of the ADC image. Hit colors reflect their matching status:- Grey — unmatched (noise)
- Blue — attached to a 2D track
- Green — delta ray hits
- Orange — single hits (blips)
ED_vch_hits_found_<module>_...png.Waveforms
plot.plot_wvf_current_daqch(daqch_list)
plot.plot_wvf_current_daqch(daqch_list)
Plots the waveform for one or more DAQ channel numbers. Each channel is shown in its own sub-panel, stacked vertically and sharing the time axis. The legend includes the corresponding view and view-channel number.
daqch_list— list of integer DAQ channel numbers.
waveforms_...png.plot.plot_wvf_current_vch(vch_list)
plot.plot_wvf_current_vch(vch_list)
Plots the waveform for one or more channels identified by (view, view-channel) pairs. Otherwise identical layout to the DAQ-channel version.
vch_list— list of(view_index, channel_number)tuples.
waveforms_...png.Noise
plot.plot_noise_daqch(noise_type)
plot.plot_noise_daqch(noise_type)
Scatter plot of the pedestal RMS for every channel in the current module, plotted against the DAQ channel number.
noise_type—'raw'for the pre-filter RMS or'filt'for the post-filter RMS.vrange—[min, max]of the y-axis (ADC, default[0, 10]).
ped_<noise_type>_rms_daqch_...png.plot.plot_noise_vch(noise_type)
plot.plot_noise_vch(noise_type)
Same as
plot_noise_daqch, but channels are re-mapped into view channel ordering — one sub-panel per view — which makes it easier to spot view-specific problems.noise_type—'raw'or'filt'.vrange—[min, max]of the y-axis (default[0, 10]).
ped_<noise_type>_ADC_rms_vch_...png.Reconstruction Visualization
These plots show the results of the track-finding stage and require-trk reconstruction to have run.
plot.plot_2dview_hits()
plot.plot_2dview_hits()
Scatter plot of all found hits in physical (position, drift) space, one panel per view. Hit markers are colored by their maximum ADC amplitude.
modules— list of module indices to include.
hits_view_...png.plot.plot_2dview_2dtracks()
plot.plot_2dview_2dtracks()
Shows all hits (light grey) overlaid with 2D reconstructed tracks in physical coordinates, one panel per view.Saved as
track2D_hits_...png.plot.plot_2dview_hits_3dtracks()
plot.plot_2dview_hits_3dtracks()
Comprehensive 2D projection showing hits color-coded by their reconstruction category (noise, track hit, delta ray, single hit) alongside both 2D and 3D tracks projected onto each view plane.Hit color legend:
- Grey — unmatched (noise)
- Blue — attached to 2D track
- Green — delta ray hits
- Orange — single hits (blips)
- Teal line — 3D track projection
reco2D_module_<N>_...png.plot.plot_3d()
plot.plot_3d()
Full 3D visualization of reconstructed tracks using matplotlib’s 3D projection. The figure contains four sub-panels: a 3D scatter view plus three 2D projections (x–y, x–z, y–z). Track endpoints are marked with star and pentagon markers. Single hits (blips) and ghost tracks are also included.Saved as
Unlike other plotting functions,
plot_3d defaults to to_be_shown=True — it will open an interactive window unless you explicitly pass to_be_shown=False.track3D_...png.Photon Detection System (PDS)
Available when-pds reconstruction is used.
plot.draw_pds_ED(glob_chans)
plot.draw_pds_ED(glob_chans)
Plots PDS waveforms for the specified global channel list as a function of time relative to the trigger (in microseconds). Solid and dashed lines show aligned and offset-corrected versions respectively.
glob_chans— list of global PDS channel indices to display.draw_peak— ifTrue, overlays markers at reconstructed peak positions.draw_cluster— ifTrue, overlays cluster boundaries.draw_roi— ifTrue, shades the signal ROI regions in the waveform.
ED_pds_<data_type>_...png.plot.draw_all_pds_ED(data_type)
plot.draw_all_pds_ED(data_type)
Draws a grid of all PDS channels for a given data stream type (Saved as
"stream" or "trigger"). Each sub-panel shows the waveform for one channel with noise RMS threshold lines.ED_pds_<data_type>_...png.Gallery Mode (PDVD only)
Gallery mode is a special display mode for PDVD data that uses an effective channel mapping so that tracks crossing CRP boundaries do not appear broken. It is activated with the-gallery command-line option.
The
both option generates two separate image files — one for the top volume and one for the bottom volume.src/lardon/gallery/pdvd.py and set self.conference_style = True in the effective_chan class constructor. This removes all tick and channel number labels from the output images.