Repository navigation
Handle missing station metadata and restore angular distances - #11
Merged
actarus2971 merged 2 commits intoNov 19, 2026
Merged
Conversation
Keep vectorized magnitude calculations while preserving zero azimuths, valid zero station metadata, missing metadata handling and null values for uncomputed bearings. Restore angular distances and keep Di Bona corrections numeric for Pandas compatibility. Validated with all 9 station metadata regression tests.
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.
The optimized calculation path assigns an azimuth of
0.0when only precomputed distances are supplied, leavesep_distance_deltaempty, and raisesKeyErrorwhen station metadata columns are absent. This change returns JSONnullfor uncomputed bearings and angular distances, restores calculated angular distances, and omits station records with missing metadata while preserving valid zero values.It also keeps Di Bona station corrections numeric to avoid an object-to-float assignment error with Pandas 3.1, and documents the station-to-event azimuth convention. The existing branch 9 behavior that already preserves calculated zero azimuths and zero coordinates/elevation is covered by regression tests.
Validation:
python3 -m unittest discover -s tests -v.git diff --checkpass.