fix warning
This commit is contained in:
@ -3172,7 +3172,10 @@ def run_pyqtgraph(args) -> None:
|
|||||||
levels = compute_background_subtracted_bscan_levels(disp_fft_lin, disp_fft)
|
levels = compute_background_subtracted_bscan_levels(disp_fft_lin, disp_fft)
|
||||||
if levels is None:
|
if levels is None:
|
||||||
try:
|
try:
|
||||||
mean_spec = np.nanmean(disp_fft, axis=1)
|
finite_rows = np.any(np.isfinite(disp_fft), axis=1)
|
||||||
|
if np.any(finite_rows):
|
||||||
|
mean_spec = np.nanmean(disp_fft[finite_rows], axis=1)
|
||||||
|
if mean_spec.size > 0:
|
||||||
vmin_v = float(np.nanmin(mean_spec))
|
vmin_v = float(np.nanmin(mean_spec))
|
||||||
vmax_v = float(np.nanmax(mean_spec))
|
vmax_v = float(np.nanmax(mean_spec))
|
||||||
if np.isfinite(vmin_v) and np.isfinite(vmax_v) and vmin_v != vmax_v:
|
if np.isfinite(vmin_v) and np.isfinite(vmax_v) and vmin_v != vmax_v:
|
||||||
|
|||||||
Reference in New Issue
Block a user