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.
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 of1.0
. However, we ofen store larger values (we decided1e6
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.