Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mhkit/dolfyn/rotate/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# Nortek instruments
"vector": r_vec,
"awac": r_awac,
"aquadopp": r_awac,
"signature": r_sig,
"ad2cp": r_sig,
# TRDI instruments
Expand Down
15 changes: 9 additions & 6 deletions mhkit/tests/dolfyn/test_rotate_adp.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,23 @@ def test_rotate_earth2inst(self):
rotate2(td_sig, "inst", inplace=True)
td_sig_i = load("Sig1000_IMU_rotate_inst2earth.nc")
rotate2(td_sig_i, "inst", inplace=True)
# Just check that these run without error
td_sig_avg = load("Sig100_avg.nc")
rotate2(td_sig_avg, "inst", inplace=True)
td_sig_dp1_ice = load("Sig500_dp_ice2.nc")
rotate2(td_sig_dp1_ice, "inst", inplace=True)

# ship and inst are considered equivalent in dolfyn
cd_rdi = load("RDI_test01_rotate_beam2inst.nc")
cd_wr2 = tr.dat_wr2
# ship and inst are considered equivalent in dolfyn
cd_wr2.attrs["coord_sys"] = "inst"
cd_awac = load("AWAC_test01_earth2inst.nc")
cd_sig = load("BenchFile01_rotate_beam2inst.nc")
cd_sig_i = load("Sig1000_IMU_rotate_beam2inst.nc")

# Just check that these run without error
td_sig_avg = load("Sig100_avg.nc")
rotate2(td_sig_avg, "inst", inplace=True)
td_sig_dp1_ice = load("Sig500_dp_ice2.nc")
rotate2(td_sig_dp1_ice, "inst", inplace=True)
td_aqd = load("AQD_test01.nc")
rotate2(td_aqd, "inst", inplace=True)

assert_allclose(td_rdi, cd_rdi, atol=1e-5)
assert_allclose(tdwr2, cd_wr2, atol=1e-5)
assert_allclose(td_awac, cd_awac, atol=1e-5)
Expand Down