dolfyn
dolfyn copied to clipboard
Bin mapping
Thank you for developing a nice package! I am trying to process a TRDI workhorse that pitched 10 - 15 degrees and needs bin mapping prior to coordinate rotations. Correct me if I am wrong, but it doesn't seem like you have bin mapping functionality in here? If I were to attempt to add this, where would be the appropriate place?
@jessecusack Thank you! You are correct, we have not tried to tackle bin mapping. I appreciate you wanting to attempt this; it would fall under the 'ADP' api, so would be added as a new file in the dolfyn/adp directory.
Just found this issue. Thank you for developing DOLfYN!
@jessecusack, @jmcvey3, I started implementing bin-mapping following Dewey & Stringer (2007)'s Equation B1 here a while ago. It could use more testing, but some sanity checks with simple synthetic velocity fields and different pitch/roll angles seem to give qualitatively correct results. Do you think this function might be useful as a starting point?
Let's get a PR for this ASAP!
I ended up implementing bin mapping in a different package, the code is here:
https://github.com/modscripps/velosearaptor/blob/9c70a0b9ab376ca14a416d4e5fae07340b65a0b0/velosearaptor/madcp.py#L897
One advantage of the linear interpolation method I use in the above is that it is vectorized and therefore quite fast. A downside is that it creates a rather large arrays that hog RAM.
I guess parts of this or @apaloczy's package could be copied into dolfyn relatively easily, but I don't have time to figure it myself.
Thanks @jessecusack. The MODScripps code is implemented in TRDI's coordinate system, correct?
The copying in should be easy, yes; testing and making sure the coordinate systems are correct would be the hard part.
Yes it does use the TRDI coordinate system.