Skip to content

variable resolution fitting - #424

Merged
rozyczko merged 3 commits into
developfrom
423-variable-resolution
Oct 7, 2026
Merged

rozyczko merged 3 commits into
developfrom
423-variable-resolution

Conversation

@rozyczko

@rozyczko rozyczko commented Oct 6, 2026

Copy link
Copy Markdown
Member

Resolution Function Handling Improvements:

  • Resolution functions are now associated with models and datasets rather than calculators, allowing each model and dataset to have its own resolution. The set_resolution_function method now takes a model_id, and calculators use the correct resolution for each model or dataset.
  • The calculator and wrapper APIs (reflectity_profile, reflectivity_profile_channel, polarized_reflectivity_profiles, and related methods) now accept an explicit resolution_function argument, ensuring that the correct resolution is used for each calculation.

API and Internal Refactoring:

  • New methods and refactored signatures in calculator base and factory classes to support per-model and per-dataset resolution, including resolution_function_for and enhanced fit function generation.
  • The polarized reflectivity calculation logic in wrappers is updated to pass and use the correct resolution function throughout the computation

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

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.44358% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.03%. Comparing base (433bb4f) to head (41021d4).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/easyreflectometry/project.py 96.90% 3 Missing ⚠️
src/easyreflectometry/calculators/factory.py 92.85% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #424      +/-   ##
===========================================
+ Coverage    94.86%   95.03%   +0.16%     
===========================================
  Files           55       55              
  Lines         5786     5977     +191     
===========================================
+ Hits          5489     5680     +191     
  Misses         297      297              
Flag Coverage Δ
integration 37.27% <28.79%> (-0.51%) ⬇️
unittests 95.03% <98.44%> (+0.16%) ⬆️

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

Files with missing lines Coverage Δ
...c/easyreflectometry/calculators/calculator_base.py 100.00% <100.00%> (ø)
...rc/easyreflectometry/calculators/refl1d/wrapper.py 97.46% <100.00%> (+0.02%) ⬆️
src/easyreflectometry/calculators/refnx/wrapper.py 100.00% <100.00%> (ø)
src/easyreflectometry/calculators/wrapper_base.py 100.00% <100.00%> (ø)
src/easyreflectometry/data/__init__.py 100.00% <100.00%> (ø)
src/easyreflectometry/data/data_store.py 100.00% <100.00%> (ø)
src/easyreflectometry/data/measurement.py 96.29% <100.00%> (+1.79%) ⬆️
src/easyreflectometry/fitting.py 99.48% <100.00%> (+0.04%) ⬆️
src/easyreflectometry/model/model.py 98.10% <100.00%> (-0.03%) ⬇️
...rc/easyreflectometry/model/resolution_functions.py 98.21% <100.00%> (+0.17%) ⬆️
... and 2 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rozyczko
rozyczko merged commit db7c787 into develop Oct 7, 2026
44 checks passed
@rozyczko
rozyczko deleted the 423-variable-resolution branch October 7, 2026 13:11
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