Number of valid points now calculates before the filling of the missing points. Also averaging is done by 1 sec. (was 10 secs)
This commit is contained in:
@ -305,6 +305,10 @@ class SweepReader(threading.Thread):
|
|||||||
for x, y in zip(xs, ys):
|
for x, y in zip(xs, ys):
|
||||||
if 0 <= x < target_width:
|
if 0 <= x < target_width:
|
||||||
sweep[x] = float(y)
|
sweep[x] = float(y)
|
||||||
|
# Метрики валидных точек до заполнения пропусков
|
||||||
|
finite_pre = np.isfinite(sweep)
|
||||||
|
n_valid_cur = int(np.count_nonzero(finite_pre))
|
||||||
|
|
||||||
# Дополнительная обработка пропусков: при --fancy заполняем внутренние разрывы, края и дотягиваем до максимальной длины
|
# Дополнительная обработка пропусков: при --fancy заполняем внутренние разрывы, края и дотягиваем до максимальной длины
|
||||||
if self._fancy:
|
if self._fancy:
|
||||||
try:
|
try:
|
||||||
@ -342,8 +346,6 @@ class SweepReader(threading.Thread):
|
|||||||
else:
|
else:
|
||||||
dt_ms = (now - self._last_sweep_ts) * 1000.0
|
dt_ms = (now - self._last_sweep_ts) * 1000.0
|
||||||
self._last_sweep_ts = now
|
self._last_sweep_ts = now
|
||||||
finite = np.isfinite(sweep)
|
|
||||||
n_valid_cur = int(np.count_nonzero(finite))
|
|
||||||
self._n_valid_hist.append((now, n_valid_cur))
|
self._n_valid_hist.append((now, n_valid_cur))
|
||||||
while self._n_valid_hist and (now - self._n_valid_hist[0][0]) > 10.0:
|
while self._n_valid_hist and (now - self._n_valid_hist[0][0]) > 10.0:
|
||||||
self._n_valid_hist.popleft()
|
self._n_valid_hist.popleft()
|
||||||
|
|||||||
Reference in New Issue
Block a user