Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Fix R outside due to float32 rounding #386

Merged
merged 3 commits into from
Jun 27, 2022
Merged

Conversation

terliuk
Copy link
Contributor

@terliuk terliuk commented Jun 23, 2022

What is the problem / what does the code in this PR do

Fix for bug where instructions are flagged outside of the TPC due to the float32 rounding. Fixes #384

@terliuk terliuk marked this pull request as ready for review June 23, 2022 14:43
@coveralls
Copy link

coveralls commented Jun 23, 2022

Coverage Status

Coverage decreased (-0.1%) to 82.584% when pulling 4f3ab4e on fix_rounding_tpc into 69e7095 on master.

@ramirezdiego
Copy link
Collaborator

Shouldn't you also modify these lines?

assert np.all(self.instructions_epix['x']**2 + self.instructions_epix['y']**2 <
self.config['tpc_radius']**2), \
"Interaction is outside the TPC (radius)"

@PavelKavrigin
Copy link
Contributor

@terliuk - I do not see the assertion error anymore when I use this branch and "undo_1mm_context" branch of cutax, with the same example input file which I used for reporting the issue.

@ramirezdiego ramirezdiego merged commit 12abb8a into master Jun 27, 2022
@ramirezdiego ramirezdiego deleted the fix_rounding_tpc branch June 27, 2022 12:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AssertionError - Outside the TPC
4 participants