Skip to content

433 summary figures - #447

Merged
rozyczko merged 4 commits into
developfrom
433-summary-figures
Oct 26, 2026
Merged

rozyczko merged 4 commits into
developfrom
433-summary-figures

Conversation

@rozyczko

Copy link
Copy Markdown
Member
  • Introduced two new dataclasses, _ReflectivitySeries and _SldSeries, to clearly represent entries in the reflectivity and SLD figures, encapsulating both measured and calculated data, their labels, colors, and vertical offsets.
  • Replaced the old _measured_series and _model_curve logic with a new _reflectivity_series method, which comprehensively determines what to plot for each experiment/model, including correct handling for spin channels, overlays, and vertical shifts.
  • Updated the SLD and reflectivity plotting methods (save_sld_plot, save_fit_experiment_plot, _sld_plotly_figure, _fit_experiment_plotly_figure) to use the new series dataclasses, ensuring consistent appearance and correct legend/grouping in both matplotlib and Plotly figures.

Data Handling and Visualization Improvements

  • Improved handling of polarized experiments: each spin channel now gets its own color and label, and spin-flip channels for non-magnetic models are correctly omitted from overlays to avoid misleading plots.
  • Added logic to shift multiple experiments vertically in reflectivity plots to prevent overlap, and clarified legend entries for shifted curves.
  • Ensured that the correct datasets are plotted after a fit, even if experiments have changed since the fit, by tracking drawn datasets and their channels.

Internal Utilities

  • Refactored _named_parameters to correctly collect and display parameter ownership across shared models, improving parameter table accuracy.

@rozyczko rozyczko added [scope] bug Bug report or fix (major.minor.PATCH) bugfix Fix to known bug [priority] high Should be prioritized soon labels Oct 26, 2026
@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.94737% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.97%. Comparing base (67141e7) to head (c9f3cb9).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/easyreflectometry/summary/summary.py 98.94% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #447      +/-   ##
===========================================
+ Coverage    95.68%   95.97%   +0.28%     
===========================================
  Files           60       60              
  Lines         7300     7349      +49     
===========================================
+ Hits          6985     7053      +68     
+ Misses         315      296      -19     
Flag Coverage Δ
integration 38.64% <0.00%> (-0.26%) ⬇️
unittests 95.97% <98.94%> (+0.28%) ⬆️

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

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

@rozyczko
rozyczko merged commit 52c2f2d into develop Oct 26, 2026
48 of 50 checks passed
@rozyczko
rozyczko deleted the 433-summary-figures branch October 26, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix to known bug [priority] high Should be prioritized soon [scope] bug Bug report or fix (major.minor.PATCH)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant