Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 instraxen/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 AxFoundation/strax#195 is merged.