[codex] Restore legacy analysis result fields#38
Merged
Conversation
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.
Summary
sndr_db,sfdr_db, andnoise_floor_dbwhile preserving the current*_dbc/*_dbfskeys.fitted_sinetoanalyze_error_phase_plane()results as a compatibility field for older callers.compute_spectrum()return undefined distortion metrics asnaninstead of raisingZeroDivisionErrorwhen the input has no signal peak.Issue coverage
Partially addresses #28.
This resolves the low-risk compatibility/result-field failures and the zero-signal spectrum crash. The remaining #28 failures are still intentionally left open:
test_verify_spec_plot_phase.pyexpects older tuple returns from polar APIs, while the current documented API returns dictionaries.Validation
MPLBACKEND=Agg uv run --with pytest pytest tests/unit/calibration/test_verify_estimate_frequencies.py::test_freq_estimation_shuffled -q-> 1 passedMPLBACKEND=Agg uv run --with pytest pytest tests/unit/calibration/test_verify_calibration_lite.py::test_calibration_lite tests/unit/aout/test_analyze_error_phase_plane.py::test_analyze_error_phase_plane_basic tests/unit/aout/test_verify_spec_plot.py tests/unit/fundamentals/test_nsd_snr_conversions.py tests/unit/fundamentals/test_verify_alias.py tests/unit/test_cap2weight.py -q-> 20 passedMPLBACKEND=Agg uv run --with pytest pytest tests/unit/models/ tests/unit/spectrum/ -q-> 581 passedgit diff --checkA broader #28 representative run still has 5 known failures after this patch, matching the remaining issue scope described above.