Fix from-time index slicing?

Apparently we want an `|` for the advanced indexing logic?
Also, fix `read_slc` start to not always be 0 XD
pre_viz_calls
Tyler Goodlet 2022-11-30 16:13:26 -05:00
parent e85e9f71ad
commit a7cebc0026
1 changed files with 4 additions and 3 deletions

View File

@ -274,7 +274,7 @@ class Flume(Struct):
# time range to the index range. # time range to the index range.
mask: np.ndarray = ( mask: np.ndarray = (
(times >= start_t) (times >= start_t)
& | # fml, i guess it's not an `&` ??
(times < stop_t) (times < stop_t)
) )
@ -313,7 +313,7 @@ class Flume(Struct):
# slice data by offset from the first index # slice data by offset from the first index
# available in the passed datum set. # available in the passed datum set.
read_slc = slice( read_slc = slice(
0, i_0 - index[0],
i_by_t[-1] - i_0, i_by_t[-1] - i_0,
) )
@ -324,6 +324,8 @@ class Flume(Struct):
mask, mask,
) )
# TODO: maybe move this our ``Viz`` type to avoid
# the shm lookup discrepancy?
def view_data( def view_data(
self, self,
plot: PlotItem, plot: PlotItem,
@ -352,7 +354,6 @@ class Flume(Struct):
arr, arr,
start_t=vr.left(), start_t=vr.left(),
stop_t=vr.right(), stop_t=vr.right(),
timeframe_s=timeframe_s,
) )
return ( return (
abs_slc, abs_slc,