fix: stitching overlap with leading/trailing masked reflectivity values#211
fix: stitching overlap with leading/trailing masked reflectivity values#211glass-ships merged 14 commits intonextfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes stitching overlap issues with leading/trailing masked reflectivity values in neutron reflectometry data processing. The main change involves renaming the smart_stitch_reflectivity function to stitch_reflectivity and implementing better handling of masked data points during workspace preparation for stitching operations.
- Renamed
smart_stitch_reflectivitytostitch_reflectivityfor clarity - Added logic to skip leading and trailing masked reflectivity values during stitching
- Updated function calls and test references to use the new function name
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/quicknxs/interfaces/data_handling/data_manipulation.py |
Renamed function and added masked data handling in workspace preparation |
src/quicknxs/interfaces/data_manager.py |
Updated function call and type annotation |
src/quicknxs/interfaces/data_handling/instrument.py |
Added type annotations to class attributes |
test/unit/quicknxs/interfaces/test_data_manager.py |
Updated test calls with q_cutoff parameter |
test/unit/quicknxs/interfaces/data_handling/test_data_manipulation.py |
Updated test function names and calls |
pyproject.toml |
Updated pip version and added vulnerability ignore |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #211 +/- ##
==========================================
+ Coverage 64.94% 64.97% +0.03%
==========================================
Files 36 36
Lines 6838 6810 -28
==========================================
- Hits 4441 4425 -16
+ Misses 2397 2385 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
backmari
left a comment
There was a problem hiding this comment.
The code coverage shows that the change in _prepare_workspace_for_stitching is not covered by testing. Could you please add a unit test for this function? A test of stitch_reflectivity with const-Q binning could be another option that would test that change.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Description of work:
stitch_reflectivity()methodsmart_stitch_reflectivity()tostitch_reflectivity()for simplicityCheck all that apply:
(if not, provide an explanation in the work description)
References:
(instructions to set up the environment)
Check list for the reviewer