now zero freq in freqs waterfall in at the bottom.
This commit is contained in:
@ -476,24 +476,24 @@ def main():
|
|||||||
np.zeros((1, 1), dtype=np.float32),
|
np.zeros((1, 1), dtype=np.float32),
|
||||||
aspect="auto",
|
aspect="auto",
|
||||||
interpolation="nearest",
|
interpolation="nearest",
|
||||||
origin="upper",
|
origin="lower",
|
||||||
cmap=args.cmap,
|
cmap=args.cmap,
|
||||||
)
|
)
|
||||||
ax_img.set_title("Сырые данные водопад")
|
ax_img.set_title("Сырые данные водопад")
|
||||||
ax_img.set_xlabel("Время (новое слева)")
|
ax_img.set_xlabel("Время (новое слева)")
|
||||||
ax_img.set_ylabel("X")
|
ax_img.set_ylabel("X (0 снизу)")
|
||||||
|
|
||||||
# Водопад спектров
|
# Водопад спектров
|
||||||
img_fft_obj = ax_spec.imshow(
|
img_fft_obj = ax_spec.imshow(
|
||||||
np.zeros((1, 1), dtype=np.float32),
|
np.zeros((1, 1), dtype=np.float32),
|
||||||
aspect="auto",
|
aspect="auto",
|
||||||
interpolation="nearest",
|
interpolation="nearest",
|
||||||
origin="upper",
|
origin="lower",
|
||||||
cmap=args.cmap,
|
cmap=args.cmap,
|
||||||
)
|
)
|
||||||
ax_spec.set_title("B-scan (дБ)")
|
ax_spec.set_title("B-scan (дБ)")
|
||||||
ax_spec.set_xlabel("Время (новое слева)")
|
ax_spec.set_xlabel("Время (новое слева)")
|
||||||
ax_spec.set_ylabel("Бин")
|
ax_spec.set_ylabel("Бин (0 снизу)")
|
||||||
|
|
||||||
# Для контроля частоты обновления
|
# Для контроля частоты обновления
|
||||||
max_fps = max(1.0, float(args.max_fps))
|
max_fps = max(1.0, float(args.max_fps))
|
||||||
@ -512,7 +512,7 @@ def main():
|
|||||||
img_obj.set_data(np.zeros((width, max_sweeps), dtype=np.float32))
|
img_obj.set_data(np.zeros((width, max_sweeps), dtype=np.float32))
|
||||||
img_obj.set_extent((0, max_sweeps - 1, 0, width - 1 if width > 0 else 1))
|
img_obj.set_extent((0, max_sweeps - 1, 0, width - 1 if width > 0 else 1))
|
||||||
ax_img.set_xlim(0, max_sweeps - 1)
|
ax_img.set_xlim(0, max_sweeps - 1)
|
||||||
ax_img.set_ylim(0, max(1, width - 1))
|
ax_img.set_ylim(max(1, width - 1), 0)
|
||||||
# FFT буферы: время по X, бин по Y
|
# FFT буферы: время по X, бин по Y
|
||||||
ring_fft = np.full((max_sweeps, fft_bins), np.nan, dtype=np.float32)
|
ring_fft = np.full((max_sweeps, fft_bins), np.nan, dtype=np.float32)
|
||||||
img_fft_obj.set_data(np.zeros((fft_bins, max_sweeps), dtype=np.float32))
|
img_fft_obj.set_data(np.zeros((fft_bins, max_sweeps), dtype=np.float32))
|
||||||
@ -740,7 +740,7 @@ def run_pyqtgraph(args):
|
|||||||
p_img.invertY(False)
|
p_img.invertY(False)
|
||||||
p_img.showGrid(x=False, y=False)
|
p_img.showGrid(x=False, y=False)
|
||||||
p_img.setLabel("bottom", "Время (новое слева)")
|
p_img.setLabel("bottom", "Время (новое слева)")
|
||||||
p_img.setLabel("left", "X")
|
p_img.setLabel("left", "X (0 снизу)")
|
||||||
img = pg.ImageItem()
|
img = pg.ImageItem()
|
||||||
p_img.addItem(img)
|
p_img.addItem(img)
|
||||||
|
|
||||||
@ -753,10 +753,10 @@ def run_pyqtgraph(args):
|
|||||||
|
|
||||||
# Водопад спектров (справа-снизу)
|
# Водопад спектров (справа-снизу)
|
||||||
p_spec = win.addPlot(row=1, col=1, title="B-scan (дБ)")
|
p_spec = win.addPlot(row=1, col=1, title="B-scan (дБ)")
|
||||||
p_spec.invertY(False)
|
p_spec.invertY(True)
|
||||||
p_spec.showGrid(x=False, y=False)
|
p_spec.showGrid(x=False, y=False)
|
||||||
p_spec.setLabel("bottom", "Время (новое слева)")
|
p_spec.setLabel("bottom", "Время (новое слева)")
|
||||||
p_spec.setLabel("left", "Бин")
|
p_spec.setLabel("left", "Бин (0 снизу)")
|
||||||
img_fft = pg.ImageItem()
|
img_fft = pg.ImageItem()
|
||||||
p_spec.addItem(img_fft)
|
p_spec.addItem(img_fft)
|
||||||
|
|
||||||
@ -795,7 +795,7 @@ def run_pyqtgraph(args):
|
|||||||
head = 0
|
head = 0
|
||||||
# Водопад: время по оси X, X по оси Y
|
# Водопад: время по оси X, X по оси Y
|
||||||
img.setImage(ring.T, autoLevels=False)
|
img.setImage(ring.T, autoLevels=False)
|
||||||
p_img.setRange(xRange=(0, max_sweeps - 1), yRange=(0, max(1, width - 1)), padding=0)
|
p_img.setRange(xRange=(0, max_sweeps - 1), yRange=(max(1, width - 1), 0), padding=0)
|
||||||
p_line.setXRange(0, max(1, width - 1), padding=0)
|
p_line.setXRange(0, max(1, width - 1), padding=0)
|
||||||
# FFT: время по оси X, бин по оси Y
|
# FFT: время по оси X, бин по оси Y
|
||||||
ring_fft = np.full((max_sweeps, fft_bins), np.nan, dtype=np.float32)
|
ring_fft = np.full((max_sweeps, fft_bins), np.nan, dtype=np.float32)
|
||||||
|
|||||||
Reference in New Issue
Block a user