Skip to content

Conversation

@JamesWrigley
Copy link
Member

This is necessary for runs with multiple multi-module detectors.

This is necessary for runs with multiple multi-module detectors.
@JamesWrigley JamesWrigley self-assigned this Feb 19, 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 😓

Comment on lines +2016 to +2019
if (detector_name is None
or detector_name in name
):
res.add((name, cls))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest this change to 'identify_multimod_detectors' function to solve my previous comment.

for name in cls._find_detector_names(data):
res.add((name, cls))
if (detector_name is None
or detector_name in name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Thomas, looks good to me. James, would you like to commit this?

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.

4 participants