Add loadOptions support for event filtering in BIOSANS and GPSANS#1092
Merged
darshdinger merged 2 commits intonextfrom Feb 5, 2026
Merged
Add loadOptions support for event filtering in BIOSANS and GPSANS#1092darshdinger merged 2 commits intonextfrom
darshdinger merged 2 commits intonextfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #1092 +/- ##
=======================================
Coverage 86.05% 86.05%
=======================================
Files 102 102
Lines 11508 11512 +4
=======================================
+ Hits 9903 9907 +4
Misses 1605 1605 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
jmborr
requested changes
Feb 5, 2026
Member
jmborr
left a comment
There was a problem hiding this comment.
I left one suggestion to check that the filter is applied. Perhaps you want to include this check in the other test functions
…ent count verification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of work:
This PR implements support for fine-grained event filtering via
loadOptionsfor HFIR SANS instruments (BIOSANS and GPSANS). Users can now specifyFilterByTimeStartandFilterByTimeStopparameters in the sample configuration to filter events by time during data loading, similar to the existing functionality in EQSANS.The implementation extracts
loadOptionsfrom the sample configuration and merges them with loading parameters, ensuring the time filtering options are passed through to the MantidLoadEventAsWorkspace2Dalgorithm.Check all that apply:
References:
To test the event filtering functionality, run the integration tests with the data repository:
pixi shell pytest tests/integration/drtsans/mono/biosans/test_loadoptions.py -v pytest tests/integration/drtsans/mono/gpsans/test_loadoptions.py -v exitAll 6 integration tests should pass (3 for BIOSANS, 3 for GPSANS), testing:
You can also verify the feature works in a reduction script by adding
loadOptionsto your sample configuration:Check list for the reviewer
Execution of tests requiring the /SNS and /HFIR filesystems
It is strongly encouraged that the reviewer runs the following tests in their local machine
because these tests are not run by the GitLab CI. It is assumed that the reviewer has the /SNS and /HFIR filesystems
remotely mounted in their machine.
In the above code snippet, substitute
<MERGE_REQUEST_NUMBER>for the actual merge request number. Also substitute<my_drtsans_dev_environment>with the name of the conda environment you use for development. It is critical thatyou have installed the repo in this conda environment in editable mode with
pip install -e .orconda develop .