OSOceanAcoustics / echopype

Enabling interoperability and scalability in ocean sonar data analysis
https://echopype.readthedocs.io/
Apache License 2.0
91 stars 71 forks source link

Added parser support for EK80 MRU1 #1242

Closed praneethratna closed 7 months ago

praneethratna commented 7 months ago

Addresses #1239 and now EK80 files of type MRU version 1 can be parsed.

CC @leewujung

jmjech commented 7 months ago

I e-mailed a 2 MB file to Wu-Jung. Let me know if it works for you. I have other "smaller" files. For some reason it is not allowing me to add the data files here.

leewujung commented 7 months ago

@jmjech: Thank you! The file works and does contain MRU1 datagrams.

@praneethratna: I have added this file (20231016_Cal_-D20231016-T220322.raw) under test_data/ek80. Could you please add a test for parsing it? In looking into this file I also checked for:

np.all(echodata["Platform"]["pitch"].data == np.array(parser.mru["pitch"]))
np.all(echodata["Platform"]["roll"].data == np.array(parser.mru["roll"]))
np.all(echodata["Platform"]["vertical_offset"].data == np.array(parser.mru["heave"]))  # note variable name change

Would be good to have these in the tests, by using the parser object https://github.com/OSOceanAcoustics/echopype/blob/03e3b52bb522222f5cdf887b6f519e47d4aae6bf/echopype/convert/api.py#L423

Thanks!!

leewujung commented 7 months ago

Also, on storing the heading variable. It is indeed in the ver.1 convention as below:

Screenshot 2023-12-14 at 11 43 23 AM

@praneethratna: Could you please add this to the set group so that it gets stored together with the other variables? As you have seen, they are on the same timebase since they are all from the MRU* datagrams. Make sure to add the attributes listed. Thanks!

praneethratna commented 7 months ago

@leewujung I have added docstring for new MRU1 type datagram and also added a new test case for the same using the file given by @jmjech. Also, now the heading variable will be stored in Platform group with the attributes that you've mentioned. Thanks!

jmjech commented 7 months ago

Thanks! I will test the code on my computer and let you know if I have any issues.