From 382a619a03c18b6fd83beb20391b07e58ea10c5e Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 30 Nov 2022 16:13:26 -0500 Subject: [PATCH] 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 --- piker/data/flows.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/piker/data/flows.py b/piker/data/flows.py index 655f9ff7..86166c2a 100644 --- a/piker/data/flows.py +++ b/piker/data/flows.py @@ -274,7 +274,7 @@ class Flume(Struct): # time range to the index range. mask: np.ndarray = ( (times >= start_t) - & + | # fml, i guess it's not an `&` ?? (times < stop_t) ) @@ -313,7 +313,7 @@ class Flume(Struct): # slice data by offset from the first index # available in the passed datum set. read_slc = slice( - 0, + i_0 - index[0], i_by_t[-1] - i_0, ) @@ -324,6 +324,8 @@ class Flume(Struct): mask, ) + # TODO: maybe move this our ``Viz`` type to avoid + # the shm lookup discrepancy? def view_data( self, plot: PlotItem, @@ -352,7 +354,6 @@ class Flume(Struct): arr, start_t=vr.left(), stop_t=vr.right(), - timeframe_s=timeframe_s, ) return ( abs_slc,