Mini-analyses and waveform plotter
Created by: JelleAalbers
This adds support for "mini-analyses": tiny bits of analysis code that automatically load data (if you do not provide it yourself) and are accessible as Context methods. A new documentation page is added to explain them, and the difference between mini-analyses and plugins.
The motivating example of a mini-analysis is the holoviews waveform display. Thanks to @AmandaDepoian @yabbyhome and @clarkmt for helping to make this code functional again during the strax workshop. From now on you can use it as e.g. st.waveform_display(run_id, seconds_range=(0, 10))
. If you want to further develop on the code, e.g. add some enhancements you made in Chicago but I did not find, you can find it in straxen/analyses/waveform_plots.py
.
I also added two more modest plots: a peak histogram and an event (cs1, cs2) scatter plot. The latter is now demonstrated in the tutorial. If you do st.event_scatter(run_id, s=20)
, you get something like:
I don't yet know if we will want to use this 'mini-analysis' concept extensively, or if it will just be for a few plots. It does open up some possible relations with xom @mlotfiben: it would be great if xom could run (some of) these mini-analyses on runs and save the plots. Then users need only commit a mini-analysis to straxen, and it will run automatically for runs in the future.
The build will fail until https://github.com/AxFoundation/strax/pull/195 is merged.