fix: prevent crashes on zero-length dimensions in echodata conversion#1624
Open
beatfactor wants to merge 1 commit intoOSOceanAcoustics:mainfrom
Open
fix: prevent crashes on zero-length dimensions in echodata conversion#1624beatfactor wants to merge 1 commit intoOSOceanAcoustics:mainfrom
beatfactor wants to merge 1 commit intoOSOceanAcoustics:mainfrom
Conversation
Partial/truncated raw files (e.g. from autonomous vehicle deployments) can produce channels with zero pings, causing: - Division by zero in set_zarr_encodings() chunk calculation - ValueError in _nan_timestamp_handler() on empty ping_time arrays - Encoding failure on all-NaN time variables Changes: - utils/coding.py: Skip all-NaN time vars in set_time_encodings(); handle zero-length and scalar dims in set_zarr_encodings() - convert/set_groups_base.py: Return [np.nan] cleanly when ping_time arrays are empty in _nan_timestamp_handler()
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1624 +/- ##
==========================================
+ Coverage 84.90% 85.53% +0.62%
==========================================
Files 79 79
Lines 6998 7010 +12
==========================================
+ Hits 5942 5996 +54
+ Misses 1056 1014 -42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partial/truncated raw files can produce channels with zero pings, causing:
Changes: