Allow passing a detector name to extra-data-make-virtual-cxi#599
Open
JamesWrigley wants to merge 2 commits intomasterfrom
Open
Allow passing a detector name to extra-data-make-virtual-cxi#599JamesWrigley wants to merge 2 commits intomasterfrom
JamesWrigley wants to merge 2 commits intomasterfrom
Conversation
This is necessary for runs with multiple multi-module detectors.
turkot
reviewed
Feb 21, 2025
| run = RunDirectory(run_dir, inc_suspect_trains=inc_suspect) | ||
|
|
||
| _, det_class = identify_multimod_detectors(run, single=True) | ||
| _, det_class = identify_multimod_detectors(run, detector_name=args.detector_name, single=True) |
Contributor
There was a problem hiding this comment.
Hi James,
I'm afraid this would not work in the current implementation, because this argument, 'detector_name', is not currently used by the 'identify_multimod_detectors' function at all 😓
turkot
reviewed
Feb 21, 2025
Comment on lines
+2016
to
+2019
| if (detector_name is None | ||
| or detector_name in name | ||
| ): | ||
| res.add((name, cls)) |
Contributor
There was a problem hiding this comment.
I suggest this change to 'identify_multimod_detectors' function to solve my previous comment.
takluyver
reviewed
Feb 24, 2025
| for name in cls._find_detector_names(data): | ||
| res.add((name, cls)) | ||
| if (detector_name is None | ||
| or detector_name in name |
Member
There was a problem hiding this comment.
I think if you're specifying a name, it should be exact; this matches how thedetector_name is used when instatiating a component.
Suggested change
| or detector_name in name | |
| or detector_name == name |
Contributor
There was a problem hiding this comment.
Thanks Thomas, looks good to me. James, would you like to commit this?
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.
This is necessary for runs with multiple multi-module detectors.