Skip to content

FIX: Reloading partial TAC calibration file clears previous parameters - #296

Merged
fhagemann merged 2 commits into
cositools:develop/emfrom
fhagemann:fix/tac-calibration
Nov 16, 2026
Merged

fhagemann merged 2 commits into
cositools:develop/emfrom
fhagemann:fix/tac-calibration

Conversation

@fhagemann

Copy link
Copy Markdown

Fixes #273.

Looks like the unit tests referenced in that issue were missing, so I added new unit tests (with ExpectedToFail) and then the fix that made the ExpectedToFail statements obsolete.


m_TACCal.clear();
m_DetectorIDs.clear();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Isn't this clear redundant with the clear in initialize since you read LoadTACCalFile immediately after Initialize? It's fine to be redundant, I'm just wondering if there's a case where we need both clears.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It's probably redundant, I can revert the last commit.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Now, we only clear in LoadTACCalFile
(which is where these vectors are populated)

@fhagemann
fhagemann force-pushed the fix/tac-calibration branch from c3943b5 to 3ab9bed Compare November 3, 2026 19:09
@fhagemann
fhagemann merged commit 5afddc8 into cositools:develop/em Nov 16, 2026
2 checks passed
@fhagemann
fhagemann deleted the fix/tac-calibration branch November 16, 2026 16:39
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.

MModuleTACCalibration: LoadTACCalFile() merges a second file into the previous calibration instead of replacing it

2 participants