lindbladmpo
lindbladmpo copied to clipboard
Changing usages of index(t) to a more robust isclose()
Summary
This PR addresses issue #11 .
The PR replaces the usage of index(t) with a more robust approach using np.isclose()
in the plot_routines.py
Details and Comments
-
Replaced instances of index(t) with a new function called
find_index_nearest_time_within_tolerance()
, utilisingnp.isclose()
. This change ensures more accurate and reliable time comparisons. -
Introduced the
rtol
parameter to thefind_index_nearest_time_within_tolerance()
function, offering control over the relative precision used in time comparisons.