diff --git a/RFG_ADC_dataplotter.py b/RFG_ADC_dataplotter.py index aad32c9..88ed519 100755 --- a/RFG_ADC_dataplotter.py +++ b/RFG_ADC_dataplotter.py @@ -305,6 +305,10 @@ class SweepReader(threading.Thread): for x, y in zip(xs, ys): if 0 <= x < target_width: sweep[x] = float(y) + # Метрики валидных точек до заполнения пропусков + finite_pre = np.isfinite(sweep) + n_valid_cur = int(np.count_nonzero(finite_pre)) + # Дополнительная обработка пропусков: при --fancy заполняем внутренние разрывы, края и дотягиваем до максимальной длины if self._fancy: try: @@ -342,8 +346,6 @@ class SweepReader(threading.Thread): else: dt_ms = (now - self._last_sweep_ts) * 1000.0 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)) while self._n_valid_hist and (now - self._n_valid_hist[0][0]) > 10.0: self._n_valid_hist.popleft()