Skip to content

FIX: Guard ring contact handling when loading 4-column strip map files - #217

Merged
fhagemann merged 2 commits into
cositools:develop/emfrom
fhagemann:fix/strip_map
Sep 24, 2026
Merged

fhagemann merged 2 commits into
cositools:develop/emfrom
fhagemann:fix/strip_map

Conversation

@fhagemann

Copy link
Copy Markdown

Fixes #216:
For strip map files with only 4 columns, we infer information about RTB, DRM, IsPrimary, ASICID and Channel from the ReadOutID. The way we were doing that so far was wrong for guard ring contacts, and also the RTB and DRM values were wrong for all strip contacts.

This PR contains two fixes:

  • correctly handle GR contacts when loading a 4-column strip map file
  • assign the correct RTB and DRM when loading a 4-column strip map file

Note: this is somewhat hard-coded for what we expect for COSI and might be different for GRIPS.

@fhagemann

Copy link
Copy Markdown
Author

To test this, we could create a 4-column strip map file from a 9-column strip map files (just keeping the first and the last three columns), and check that if we generate a strip map from the "full" 9-column strip map file and the "compact" 4-column strip map file, the stored MStripMap is identical (?)

@fhagemann
fhagemann requested a review from zoglauer September 24, 2026 02:05
@fhagemann fhagemann added the bug Something isn't working label Sep 24, 2026
@zoglauer

Copy link
Copy Markdown
Collaborator

Well, I saw what you wrote before, guess we see if it works when we have the real data?

@fhagemann

Copy link
Copy Markdown
Author

I tested this on a file containing only pulser data, but with 4 active detectors.
Pre-PR I was getting this error using a 4-column strip map file:

MStripMap: ASIC polarity update creates a duplicate detector/side/strip tuple for detector 0 strip 64
XmlTagMeasurementLoaderHDF: Unable to update ASIC polarities based on the config JSON.

Now with the changes in this PR, I don't get the error anymore and the results look reasonable.

@fhagemann
fhagemann merged commit 319ac97 into cositools:develop/em Sep 24, 2026
1 check passed
@fhagemann
fhagemann deleted the fix/strip_map branch September 24, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Correctly handle guard ring strips in strip map files with only 4 columns

2 participants