Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust eps value (floating point precision) #193

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Adjust eps value (floating point precision) #193

merged 1 commit into from
Aug 23, 2024

Conversation

schuenke
Copy link
Collaborator

As discussed in #129 with @FrankZijlstra and @btasdelen and many other issues/slack chats etc., the current value for the floating point precision np.finfo(np.float64).eps is only valid at the exact value of 1.0. However, we ofen store larger values (we decided 1e6 is a reasonable upper limit for times, grad/rf amplitudes etc), leading to way worse precisions.

I added a comment describing how we pick the new value of eps = 1e-9 now and left the full calculation. Maybe one of both can be removed, but IMO you can never have to much documentation 😄

In the future, we might want to define different eps values for times, gradients, rf pulses etc, but I think this value should actually cover everything without beeing to inaccurate.

@btasdelen btasdelen merged commit 25938e8 into dev Aug 23, 2024
11 checks passed
@schuenke schuenke deleted the eps_value branch November 1, 2024 07:36
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