Repository navigation
Add superplot and normalize options to Experiment.plot_data - #292
Merged
Merged
Conversation
superplot=True uses plopp's superplot, so Q slices can be kept on the figure and compared while sliding. normalize=True divides each Q spectrum by its sum over energy, for the plot only. Shown in the experiment tutorial. Closes #192 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #292 +/- ##
========================================
Coverage 98.23% 98.23%
========================================
Files 65 65
Lines 6335 6341 +6
Branches 1065 1068 +3
========================================
+ Hits 6223 6229 +6
Misses 59 59
Partials 53 53
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #192
Adds two options to
Experiment.plot_data():superplot=Trueuses plopp'ssuperplot: like the slicer, but with a tool to keep the current Q line on the figure, so several Q values can be compared in different colours while sliding on. Passing bothslicer=Trueandsuperplot=Trueraises aValueError.normalize=Truedivides each Q spectrum by its sum over energy before plotting, so line shapes at different Q are easy to compare. Only the plot is affected, not the stored data. Works with all three plot modes.The slicer's "switch to single-handle sliders" step now runs for the slicer only, because superplot has single-handle sliders already (and would crash on that step).
A short section at the end of the experiment tutorial shows both options.
🤖 Generated with Claude Code