Avoid index-from-time slicing including gaps

Not sure why this was ever allowed but, for slicing to the sample
*before* whatever target time stamp is passed in we should definitely
not return the prior index as for the slice start since that might
include a very large gap prior to whatever sample is scanned to have
the earliest matching time stamp.

This was essential to fixing overlay intersect points searching in our
``ui.view_mode`` machinery..
storage_cli
Tyler Goodlet 2023-02-27 11:51:19 -05:00
parent 5ec873fa2a
commit c5a9cc22c2
1 changed files with 1 additions and 1 deletions

View File

@ -395,7 +395,7 @@ def slice_from_time(
# f'diff: {t_diff}\n'
# f'REMAPPED START i: {read_i_start} -> {new_read_i_start}\n'
# )
read_i_start = new_read_i_start - 1
read_i_start = new_read_i_start
t_iv_stop = times[read_i_stop - 1]
if (