fix scale
This commit is contained in:
@ -683,6 +683,7 @@ def run_pyqtgraph(args) -> None:
|
|||||||
|
|
||||||
def update() -> None:
|
def update() -> None:
|
||||||
nonlocal peak_ref_window, status_dirty
|
nonlocal peak_ref_window, status_dirty
|
||||||
|
norm_display_scale = 500.0
|
||||||
if peak_calibrate_mode and any(edit.hasFocus() for edit in c_edits):
|
if peak_calibrate_mode and any(edit.hasFocus() for edit in c_edits):
|
||||||
return
|
return
|
||||||
if peak_search_enabled and peak_window_edit is not None and peak_window_edit.hasFocus():
|
if peak_search_enabled and peak_window_edit is not None and peak_window_edit.hasFocus():
|
||||||
@ -720,12 +721,17 @@ def run_pyqtgraph(args) -> None:
|
|||||||
curve_calib.setData([], [])
|
curve_calib.setData([], [])
|
||||||
|
|
||||||
if runtime.current_sweep_norm is not None:
|
if runtime.current_sweep_norm is not None:
|
||||||
curve_norm.setData(xs[: runtime.current_sweep_norm.size], runtime.current_sweep_norm, autoDownsample=True)
|
norm_display = runtime.current_sweep_norm * norm_display_scale
|
||||||
|
curve_norm.setData(xs[: norm_display.size], norm_display, autoDownsample=True)
|
||||||
else:
|
else:
|
||||||
curve_norm.setData([], [])
|
curve_norm.setData([], [])
|
||||||
|
|
||||||
if fixed_ylim is None:
|
if fixed_ylim is None:
|
||||||
y_series = [runtime.current_sweep_raw, displayed_calib, runtime.current_sweep_norm]
|
y_series = [
|
||||||
|
runtime.current_sweep_raw,
|
||||||
|
displayed_calib,
|
||||||
|
(runtime.current_sweep_norm * norm_display_scale) if runtime.current_sweep_norm is not None else None,
|
||||||
|
]
|
||||||
y_limits = compute_auto_ylim(*y_series)
|
y_limits = compute_auto_ylim(*y_series)
|
||||||
if y_limits is not None:
|
if y_limits is not None:
|
||||||
p_line.setYRange(y_limits[0], y_limits[1], padding=0)
|
p_line.setYRange(y_limits[0], y_limits[1], padding=0)
|
||||||
|
|||||||
Reference in New Issue
Block a user