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

Add option for const Q binning per run #134

Merged
merged 18 commits into from
Dec 4, 2024
Merged

Add option for const Q binning per run #134

merged 18 commits into from
Dec 4, 2024

Conversation

backmari
Copy link
Collaborator

@backmari backmari commented Nov 11, 2024

Description of work:

Add new option to enable reduction in constant Q binning, which is a reduction option in lr_reduction method process_from_template. The option is added as a new column in the reduction table: "Const. Q Bin." and is thus configurable per run.

This change also consolidates logic that updates/clears the reduction table into the class ReductionTableHandler.

Screenshot from 2024-12-02 10-53-59

Check all that apply:

  • added release notes (if not, provide an explanation in the work description)
  • updated documentation
  • Source added/refactored
  • Added unit tests
  • Added integration tests
  • Verified that tests requiring the /SNS and /HFIR filesystems pass without fail

References:

Manual test for the reviewer

(instructions to set up the environment)

Start RefRed GUI

(refred)> PYTHONPATH=$(pwd):$PYTHONPATH ./scripts/start_refred.py

Or run tests

(refred)> pytest test/unit/RefRed/test_main.py

Manual tests:

  • loading/saving a configuration preserves the new option in the reduction table
  • clearing a row or the clearing the whole table clears the new checkbox (these are right-click options in the first column of the table)

Check list for the reviewer

  • release notes updated, or an explanation is provided as to why release notes are unnecessary
  • best software practices
    • 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

@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 91.33333% with 13 lines in your changes missing coverage. Please review.

Project coverage is 62.44%. Comparing base (20ccadb) to head (6b864cf).
Report is 1 commits behind head on next.

Files with missing lines Patch % Lines
...duction_table_handling/const_q_checkbox_handler.py 85.00% 3 Missing ⚠️
...eduction_table_handling/reduction_table_handler.py 95.31% 3 Missing ⚠️
...table/populate_reduction_table_from_list_lrdata.py 50.00% 2 Missing ⚠️
RefRed/calculations/lr_data.py 50.00% 2 Missing ⚠️
...reduction_table_handling/update_reduction_table.py 71.42% 2 Missing ⚠️
RefRed/main.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next     #134      +/-   ##
==========================================
+ Coverage   60.45%   62.44%   +1.98%     
==========================================
  Files         121      122       +1     
  Lines       10139    10191      +52     
==========================================
+ Hits         6130     6364     +234     
+ Misses       4009     3827     -182     

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

@backmari backmari marked this pull request as draft November 19, 2024 16:22
@backmari backmari marked this pull request as ready for review December 2, 2024 15:57
@backmari backmari merged commit ba6e8e4 into next Dec 4, 2024
3 checks passed
@backmari backmari deleted the const_q_binning branch December 4, 2024 21:28
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