Skip to content

Polarized channels - #393

Open
rozyczko wants to merge 20 commits into
developfrom
polarized_channels
Open

Polarized channels#393
rozyczko wants to merge 20 commits into
developfrom
polarized_channels

Conversation

@rozyczko

Copy link
Copy Markdown
Member

Enhancements to Polarized Neutron Reflectometry and Magnetism:

  • Full support for all four polarization channels (pp, pm, mp, mm) in the refl1d calculator, including new APIs and improved handling of magnetic layers and their properties. This includes new classes (LayerMagnetism, PolarizedDataSet) and channel-aware accessors.
  • Improved magnetic depth profile computation, more robust spin asymmetry calculations, and caching for polarized cross-sections to optimize performance.
  • New and improved methods for fitting polarized datasets, reporting, and handling of magnetic parameters and edge cases.

@rozyczko rozyczko added [scope] enhancement Adds/improves features (major.MINOR.patch) [priority] high Should be prioritized soon enhancement labels Aug 18, 2026
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.53571% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.69%. Comparing base (299127d) to head (f9a4442).

Files with missing lines Patch % Lines
src/easyreflectometry/summary/summary.py 80.00% 12 Missing ⚠️
src/easyreflectometry/project.py 96.74% 8 Missing ⚠️
...rc/easyreflectometry/calculators/refl1d/wrapper.py 95.72% 5 Missing ⚠️
src/easyreflectometry/data/polarized.py 96.42% 4 Missing ⚠️
...ctometry/sample/elements/layers/layer_magnetism.py 91.66% 3 Missing ⚠️
src/easyreflectometry/calculators/factory.py 91.66% 1 Missing ⚠️
src/easyreflectometry/fitting.py 99.08% 1 Missing ⚠️
.../easyreflectometry/sample/elements/layers/layer.py 96.29% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #393      +/-   ##
===========================================
+ Coverage    92.99%   93.69%   +0.70%     
===========================================
  Files           48       51       +3     
  Lines         3852     4519     +667     
===========================================
+ Hits          3582     4234     +652     
- Misses         270      285      +15     
Flag Coverage Δ
integration 30.69% <23.85%> (-0.91%) ⬇️
unittests 93.69% <95.53%> (+0.70%) ⬆️

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

Files with missing lines Coverage Δ
src/easyreflectometry/calculators/__init__.py 66.66% <100.00%> (+1.96%) ⬆️
...c/easyreflectometry/calculators/calculator_base.py 100.00% <100.00%> (+1.21%) ⬆️
src/easyreflectometry/calculators/polarization.py 100.00% <100.00%> (ø)
...easyreflectometry/calculators/refl1d/calculator.py 100.00% <ø> (ø)
src/easyreflectometry/calculators/refnx/wrapper.py 100.00% <ø> (+1.61%) ⬆️
src/easyreflectometry/calculators/wrapper_base.py 100.00% <100.00%> (+1.38%) ⬆️
src/easyreflectometry/data/__init__.py 100.00% <100.00%> (ø)
src/easyreflectometry/limits.py 100.00% <100.00%> (ø)
src/easyreflectometry/model/model.py 96.99% <100.00%> (+0.06%) ⬆️
src/easyreflectometry/sample/__init__.py 100.00% <100.00%> (ø)
... and 8 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement [priority] high Should be prioritized soon [scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant