Skip to content

Add superplot and normalize options to Experiment.plot_data - #292

Merged
henrikjacobsenfys merged 1 commit into
developfrom
superplot-experiment
Nov 12, 2026
Merged

henrikjacobsenfys merged 1 commit into
developfrom
superplot-experiment

Conversation

@henrikjacobsenfys

Copy link
Copy Markdown
Member

Closes #192

Adds two options to Experiment.plot_data():

  • superplot=True uses plopp's superplot: 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 both slicer=True and superplot=True raises a ValueError.
  • normalize=True divides 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

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]>
@henrikjacobsenfys henrikjacobsenfys added the [scope] enhancement Adds/improves features (major.MINOR.patch) label Nov 12, 2026
@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.23%. Comparing base (7248dbd) to head (d882c18).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
src/easydynamics/experiment/experiment.py 88.23% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           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           
Flag Coverage Δ
unittests 98.23% <88.23%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/easydynamics/experiment/experiment.py 98.93% <88.23%> (+0.03%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@henrikjacobsenfys
henrikjacobsenfys merged commit 4661fda into develop Nov 12, 2026
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant