diff --git a/piker/tsp/_anal.py b/piker/tsp/_anal.py index 26c3740e..bcf20a26 100644 --- a/piker/tsp/_anal.py +++ b/piker/tsp/_anal.py @@ -275,6 +275,10 @@ def get_null_segs( # diff of abs index steps between each zeroed row absi_zdiff: np.ndarray = np.diff(absi_zeros) + if zero_t.size < 2: + breakpoint() + return None + # scan for all frame-indices where the # zeroed-row-abs-index-step-diff is greater then the # expected increment of 1. @@ -434,8 +438,8 @@ def get_null_segs( def iter_null_segs( timeframe: float, - frame: Frame | None = None, - null_segs: tuple | None = None, + frame: Frame|None = None, + null_segs: tuple|None = None, ) -> Generator[ tuple[ @@ -487,7 +491,8 @@ def iter_null_segs( start_dt = None if ( absi_start is not None - and start_t != 0 + and + start_t != 0 ): fi_start: int = absi_start - absi_first start_row: Seq = frame[fi_start] @@ -501,8 +506,8 @@ def iter_null_segs( yield ( absi_start, absi_end, # abs indices fi_start, fi_end, # relative "frame" indices - start_t, end_t, - start_dt, end_dt, + start_t, end_t, # epoch times + start_dt, end_dt, # dts )