-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 'Division by Zero' error when converting EK80 files without Sound Velocity Profile Depth value(s) #1381
Fix 'Division by Zero' error when converting EK80 files without Sound Velocity Profile Depth value(s) #1381
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1381 +/- ##
==========================================
- Coverage 83.52% 80.22% -3.31%
==========================================
Files 64 18 -46
Lines 5686 3089 -2597
==========================================
- Hits 4749 2478 -2271
+ Misses 937 611 -326
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@leewujung This should be ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ctuguinay : This looks good. I agree [np.nan]
is better than []
. There may be something else we need to change further on this due to the newly discovered Environment datagram variability (only the first one in a .raw file contain the full set of data and the later ones containing only a subset).
The only comment I have is whether we need 3 test files. If these are identical in what the content is like, let's just keep one.
@leewujung Thanks for the review! Just made the change to use just one test (since the content was identical). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks @ctuguinay! I resolved one merge conflict and this should be ready to go!
When trying to save an Echodata object to Zarr that was missing the Sound Velocity Profile Depth coordinate in the Environment group, I got the following error:
Zarr doesn't seem to like it when a coordinate has no associated value(s):
So instead of setting
sound_velocity_profile_depth
to[]
in set groups when the parser contains no associated values, I set it to[np.nan]
.