Skip to content

Harden raw data check in components for the future#713

Merged
takluyver merged 2 commits intomasterfrom
fix/robuster-raw-check
Mar 16, 2026
Merged

Harden raw data check in components for the future#713
takluyver merged 2 commits intomasterfrom
fix/robuster-raw-check

Conversation

@philsmt
Copy link
Copy Markdown
Contributor

@philsmt philsmt commented Jan 7, 2026

As noticed in #712, we can make the generic MultimodDetectorBase._data_is_raw() more robust against future changes to corrected data by using the .../CORR/... source names starting this run.

As pointed out by @takluyver, AGIPD already uses a custom implementation of this method exploiting its shape change to differentiate between raw and proc.

@philsmt philsmt requested a review from takluyver January 7, 2026 10:13
@takluyver
Copy link
Copy Markdown
Member

I was surprised that the added line wasn't being reached in the tests. But the main code path that calls _data_is_raw (_identify_sources) only calls it for /DET/ sources. But it's also used in the component __repr__.

Let's add a couple of checks in test_modern_corr_sources that the repr correctly shows raw/proc.

@takluyver takluyver added this to the 1.24 milestone Mar 10, 2026
@takluyver takluyver merged commit 847c971 into master Mar 16, 2026
9 of 10 checks passed
@takluyver takluyver deleted the fix/robuster-raw-check branch March 16, 2026 11:23
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.

2 participants