Skip to content

Commit 1f8ebcc

Browse files
authored
Add Aquadopp rotation (#465)
Fixing oversight of leaving out aquadopps from the rotation table definitions. Issue #464
1 parent 3c8910d commit 1f8ebcc

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎mhkit/dolfyn/rotate/api.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# Nortek instruments
1515
"vector": r_vec,
1616
"awac": r_awac,
17+
"aquadopp": r_awac,
1718
"signature": r_sig,
1819
"ad2cp": r_sig,
1920
# TRDI instruments

‎mhkit/tests/dolfyn/test_rotate_adp.py‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,20 +118,23 @@ def test_rotate_earth2inst(self):
118118
rotate2(td_sig, "inst", inplace=True)
119119
td_sig_i = load("Sig1000_IMU_rotate_inst2earth.nc")
120120
rotate2(td_sig_i, "inst", inplace=True)
121-
# Just check that these run without error
122-
td_sig_avg = load("Sig100_avg.nc")
123-
rotate2(td_sig_avg, "inst", inplace=True)
124-
td_sig_dp1_ice = load("Sig500_dp_ice2.nc")
125-
rotate2(td_sig_dp1_ice, "inst", inplace=True)
126121

122+
# ship and inst are considered equivalent in dolfyn
127123
cd_rdi = load("RDI_test01_rotate_beam2inst.nc")
128124
cd_wr2 = tr.dat_wr2
129-
# ship and inst are considered equivalent in dolfyn
130125
cd_wr2.attrs["coord_sys"] = "inst"
131126
cd_awac = load("AWAC_test01_earth2inst.nc")
132127
cd_sig = load("BenchFile01_rotate_beam2inst.nc")
133128
cd_sig_i = load("Sig1000_IMU_rotate_beam2inst.nc")
134129

130+
# Just check that these run without error
131+
td_sig_avg = load("Sig100_avg.nc")
132+
rotate2(td_sig_avg, "inst", inplace=True)
133+
td_sig_dp1_ice = load("Sig500_dp_ice2.nc")
134+
rotate2(td_sig_dp1_ice, "inst", inplace=True)
135+
td_aqd = load("AQD_test01.nc")
136+
rotate2(td_aqd, "inst", inplace=True)
137+
135138
assert_allclose(td_rdi, cd_rdi, atol=1e-5)
136139
assert_allclose(tdwr2, cd_wr2, atol=1e-5)
137140
assert_allclose(td_awac, cd_awac, atol=1e-5)

0 commit comments

Comments
 (0)