File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1089,6 +1089,9 @@ def _plot_perday_echogram(
10891089
10901090 range_var = "depth" if "depth" in ds .coords or "depth" in ds .dims else "echo_range"
10911091 depth_vals = ds [range_var ].values
1092+ # echo_range may be 2D (channel, range_sample) — flatten to 1D
1093+ if depth_vals .ndim == 2 :
1094+ depth_vals = depth_vals [0 ]
10921095 if range_var == "echo_range" :
10931096 depth_vals = depth_vals + TRANSDUCER_DEPTH
10941097
@@ -1515,6 +1518,9 @@ def _prepare_echogram_data(
15151518
15161519 range_var = "depth" if "depth" in ds .coords or "depth" in ds .dims else "echo_range"
15171520 depth_vals = ds [range_var ].values
1521+ # echo_range may be 2D (channel, range_sample) — flatten to 1D
1522+ if depth_vals .ndim == 2 :
1523+ depth_vals = depth_vals [0 ]
15181524 if range_var == "echo_range" :
15191525 depth_vals = depth_vals + TRANSDUCER_DEPTH
15201526
You can’t perform that action at this time.
0 commit comments