lkilcher / dolfyn

A library for oceanographic doppler instruments such as Acoustic Doppler Profilers (ADPs, ADCPs) and Acoustic Doppler Velocimeters (ADVs).
BSD 3-Clause "New" or "Revised" License
42 stars 25 forks source link

Amplitude and correlation coordinates changing and possibly incorrect #96

Closed dnowacki-usgs closed 2 years ago

dnowacki-usgs commented 2 years ago

For Nortek Vector instruments, amplitude and correlation are quantities related to the beams and do not depend on the measurement coordinate system. In DOLfYN, however, the dir coordinate of amp and corr is that of the deployment, instead of beam. Additionally, since these variables use the dir coordinate, the coordinates change after rotating. The values themselves do not change (since they are not in the rotate_vars attr), but their coordinates do, which is unexpected and I believe incorrect behavior.

I think the solution here is always to map amp and corr to beam coordinates and not the dir coordinate. I'm not yet familiar enough with the code to propose a PR, but happy to help if I can.

jmcvey3 commented 2 years ago

Good catch, thanks! Yes, the values shouldn't change and the variables should stay in beam coordinates.

jmcvey3 commented 2 years ago

Closing as this particular issue is fixed.