Add break for single bar null segments
parent
d0966e0363
commit
d2e1d6ce91
|
|
@ -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.
|
||||
|
|
@ -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
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue