Skip to content

Matplotlib waveform plotter

Luca Scotto Lavina requested to merge new_wvdisp into master

Created by: JelleAalbers

This adds the mini analysis plot_waveform to straxen contexts, which produces a static matplotlib waveform image. It only contains basic elements currently, there is much more we could add (peak labels, insets with hitpatterns, etc).

I hope this will be a useful alternative to the existing holoviews-based display (st.waveform_display), especially for generating static image plots for notes and presentations. I imagine it is also easier to customize if, like me, you are much more familiar with matplotlib than holoviews.

Example:

st.plot_waveform('180215_1029', seconds_range=(50.27050, 50.27075))

example_wv

This only requires the availability of peaks, so we should be able to run it from notebooks in the analysis facility.

If, however, you do have records available for a dataset, you can pass deep=True to view the per-PMT waveforms:

st.plot_waveform('180215_1029', seconds_range=(50.270450, 50.27075), deep=True)

example_wv_deep

You can reposition the colorbar in the lower pane using the cbar_loc argument.

If you want to get the matrix in the bottom plot directly for some other use, use the new mini_analysis records_matrix.

Merge request reports

Loading