Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mini-analyses and waveform plotter #19

Merged
merged 10 commits into from
Jul 6, 2019
Merged

Mini-analyses and waveform plotter #19

merged 10 commits into from
Jul 6, 2019

Conversation

JelleAalbers
Copy link
Contributor

@JelleAalbers JelleAalbers commented Jun 30, 2019

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:

event_scatter_demo

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.

@JelleAalbers JelleAalbers merged commit b441c9a into master Jul 6, 2019
@JelleAalbers JelleAalbers deleted the mini_analyses branch July 6, 2019 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant