fix
This commit is contained in:
@ -201,6 +201,21 @@ class RingBuffer:
|
||||
base = self.ring if self.head == 0 else np.roll(self.ring, -self.head, axis=0)
|
||||
return base.T
|
||||
|
||||
def get_display_raw_decimated(self, max_points: int) -> np.ndarray:
|
||||
"""Return a display-oriented raw waterfall with optional frequency decimation."""
|
||||
if self.ring is None:
|
||||
return np.zeros((1, 1), dtype=np.float32)
|
||||
|
||||
limit = int(max_points)
|
||||
if limit <= 0 or self.width <= limit:
|
||||
return self.get_display_raw()
|
||||
|
||||
row_order = np.arange(self.ring.shape[0], dtype=np.int64)
|
||||
if self.head:
|
||||
row_order = np.roll(row_order, -self.head)
|
||||
col_idx = np.linspace(0, self.width - 1, limit, dtype=np.int64)
|
||||
return self.ring[np.ix_(row_order, col_idx)].T
|
||||
|
||||
def get_display_fft_linear(self) -> np.ndarray:
|
||||
if self.ring_fft is None:
|
||||
return np.zeros((1, 1), dtype=np.float32)
|
||||
|
||||
Reference in New Issue
Block a user