Repository navigation
fix(preprocess): reject degenerate delay axis in load_and_clean - #33
Open
IG-ABHINAV wants to merge 1 commit into
Open
IG-ABHINAV wants to merge 1 commit into
IG-ABHINAV wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Closes #32.
load_and_cleanaccepted a one-delay trace, then failed later with an unrelated error (ZeroDivisionErrorinGrid.__init__, or a finufft segfault) because_delay_filtertakes the mean of an empty diff. Added_validate_delay_axisincroak/preprocess.py, called in bothload_and_cleanandfilter_frog_trace: it raisesValueError("the delay axis needs at least two distinct finite values ...")for fewer than two distinct finite delays. Added 2 regression tests and a changelog.d fragment.Tests: ruff check and ruff format --check clean on both changed files; validator logic run standalone with numpy — all 4 degenerate cases raise the exact ValueError, valid axes pass through.
Note: the repo test suite was not runnable locally (requires Python >= 3.14; this sandbox has 3.12) — please let CI run the full gate before merging.