Skip to content

Commit f9271c2

Browse files
Adjust vadcp_b_bin_depths to be proper array size
2 parents 55c5a57 + 952b7e9 commit f9271c2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ion_functions/data/adcp_functions.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,12 @@ def vadcp_b_bin_depths(depth, cell_positions, orientation):
592592

593593
if not orientation.all() or orientation.all() not in [-1, 1]:
594594
return []
595-
return [depth + orientation*position for position in cell_positions]
595+
596+
bin_depths = []
597+
for i, bin in enumerate(cell_positions):
598+
result = depth[i] + orientation[i]*bin
599+
bin_depths.append(result)
600+
return np.array(bin_depths)
596601

597602

598603
def vadcp_b_beam_eastward(b1, b2, b3, b4, pg1, pg2, pg3, pg4, h, p, r, lat, lon, dt, tm):

0 commit comments

Comments
 (0)