Do single `ShmArray.array` read on zero-time filtering
parent
2c6ae5d994
commit
08e8990fe3
|
@ -209,8 +209,13 @@ def detect_null_time_gap(
|
||||||
NOTE: for now presumes only ONE gap XD
|
NOTE: for now presumes only ONE gap XD
|
||||||
|
|
||||||
'''
|
'''
|
||||||
zero_pred: np.ndarray = shm.array['time'] == 0
|
# ensure we read buffer state only once so that ShmArray rt
|
||||||
zero_t: np.ndarray = shm.array[zero_pred]
|
# circular-buffer updates don't cause a indexing/size mismatch.
|
||||||
|
array: np.ndarray = shm.array
|
||||||
|
|
||||||
|
zero_pred: np.ndarray = array['time'] == 0
|
||||||
|
zero_t: np.ndarray = array[zero_pred]
|
||||||
|
|
||||||
if zero_t.size:
|
if zero_t.size:
|
||||||
istart, iend = zero_t['index'][[0, -1]]
|
istart, iend = zero_t['index'][[0, -1]]
|
||||||
start, end = shm._array['time'][
|
start, end = shm._array['time'][
|
||||||
|
|
Loading…
Reference in New Issue