Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce two samples #91

Merged
merged 20 commits into from
Oct 29, 2024
Merged

Reduce two samples #91

merged 20 commits into from
Oct 29, 2024

Conversation

backmari
Copy link
Collaborator

@backmari backmari commented Jun 3, 2024

Short description of the changes:

This change makes it possible to select multiple regions of interest in the same run and reduce them together. At MagRef it is common to have more than one sample per run, and this change makes it easier to reduce the data from such runs.

Users can add additional reduction tables by clicking the button with a "+" sign. This copies the runs from the first (main) reduction table. By selecting another reduction table "Data (ROI 2)" and adjusting the region of interest, the user can see the reflectivity curve for that sample. When the user clicks the button "Reduce..." and confirms the reduction options, each reduction table is reduced and reduced files are written.

image

Check list for the pull request

  • I have read the [CONTRIBUTING]
  • I have read the [CODE_OF_CONDUCT]
  • I have added tests for my changes
  • I have updated the documentation accordingly

Check list for the reviewer

  • I have read the [CONTRIBUTING]
  • I have verified the proposed changes
  • best software practices
    • all internal functions have an underbar, as is python standard
    • clearly named variables (better to be verbose in variable names)
    • code comments explaining the intent of code blocks
  • All the tests are passing
  • The documentation is up to date
  • code comments added when explaining intent

Manual test for the reviewer

Reduced data file with multiple peaks (need to remove .txt file extension):
REF_M_manual_test_multiple_peaks.dat.txt

References

Story 1233: [QUICKNXS] Add the capability to reduce two samples from the same run

@backmari backmari marked this pull request as draft June 3, 2024 15:18
@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 81.08974% with 59 lines in your changes missing coverage. Please review.

Project coverage is 60.81%. Comparing base (8174025) to head (7d8aea8).

Files with missing lines Patch % Lines
...ivity_ui/interfaces/event_handlers/main_handler.py 72.22% 25 Missing ⚠️
...ui/interfaces/data_handling/processing_workflow.py 0.00% 17 Missing ⚠️
reflectivity_ui/interfaces/data_manager.py 90.42% 9 Missing ⚠️
reflectivity_ui/interfaces/main_window.py 87.80% 5 Missing ⚠️
...ctivity_ui/interfaces/data_handling/quicknxs_io.py 96.96% 2 Missing ⚠️
reflectivity_ui/interfaces/result_viewer.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next      #91      +/-   ##
==========================================
+ Coverage   58.57%   60.81%   +2.23%     
==========================================
  Files          33       33              
  Lines        6330     6535     +205     
==========================================
+ Hits         3708     3974     +266     
+ Misses       2622     2561      -61     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@backmari backmari force-pushed the reduce_two_samples branch 3 times, most recently from 30f7148 to f2d36db Compare September 17, 2024 16:01
@backmari backmari marked this pull request as ready for review September 17, 2024 18:08
- fix wrong data plotted when loading reduced data with multiple peaks
- fix error thrown when removing the active run from a data tab
- fix additional data tabs not cleared when reloading reduced data file
- fix additional data tabs not cleared when pressing button "Remove all data sets from the reduction list" and changed tool tip text
@jmborr jmborr self-requested a review October 29, 2024 15:01
reflectivity_ui/interfaces/data_manager.py Show resolved Hide resolved
reflectivity_ui/interfaces/data_manager.py Show resolved Hide resolved
reflectivity_ui/interfaces/data_manager.py Show resolved Hide resolved
reflectivity_ui/interfaces/data_manager.py Show resolved Hide resolved
reflectivity_ui/interfaces/data_manager.py Show resolved Hide resolved
reflectivity_ui/interfaces/data_manager.py Outdated Show resolved Hide resolved
reflectivity_ui/interfaces/main_window.py Show resolved Hide resolved
@backmari backmari merged commit 3a52a26 into next Oct 29, 2024
3 checks passed
@backmari backmari deleted the reduce_two_samples branch October 29, 2024 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants