feat(notch): tap caps 512 → 1024; the clamp warning reports the estimated achievable rejection #48
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ykp/gensig!48
Loading…
Reference in a new issue
No description provided.
Delete branch "notch-taps-1024"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Operator request: raise
MAX_TAPSto 1024 for steeper notches / higher stopband attenuation — plus the small changes that make the 60 dB target reachable in most cases.Changes
bandpass.MAX_TAPS512 → 1024 andDEFAULT_NOTCH_TAP_CAP512 → 1024 (the notch cap is an independent setting defaulting to the band filter's scale, per spec §5.3.3 — kept in sync).≈ 8 + 14.36·Δf_norm·capdB) against the record's target, naming the two 60 dB levers (widen the transition / raise the cap). Previously the warning only said the rejection "may fall below the target" with no number.Measured impact (Fe = 200 MHz)
So with the bump, the 60 dB target is reached for transitions ≥ ~1 MHz; even 0.5 MHz lands within ~3 dB of it.
Suggestions for consistently hitting 60 dB (for the operator)
Fe = 200 MHz,Transition ≥ ~1 MHzreaches 60 dB within the 1024-tap cap; 2 MHz leaves comfortable headroom (the default fixture's −73 dB).grid_density(marginal convergence gain, more compute), per-waveform caps (the global setting suffices).Gate
pytest: 1288 passed / 64 skipped (headless tier), coverage 93.59 %ruff+mypy: clean- bandpass.MAX_TAPS 512 -> 1024 (operator request: steeper notches, higher stopband attenuation before the order clamp engages) and DEFAULT_NOTCH_TAP_CAP follows (the notch cap is an independent setting defaulting to the band filter's scale, spec §5.3.3). - The clamp warning now REPORTS the estimated achievable rejection (the Kaiser-form inverse, ~8 + 14.36·dF_norm·cap dB) against the record's target, with the two 60 dB levers named: widen the record's transition band, or raise the notch tap cap setting. - Measured (Fe = 200 MHz): transitions >= 1 MHz fit the estimate under the cap (725 taps, no clamp) and reach the 60 dB target; the 0.5 MHz case clamps at 1025 taps and still measures -57.5 dB at the band centre (remez equiripple beats the Kaiser-form ~45 dB estimate). - tests: notch-cap default premise (1024), dialog field-shape premise ('1024'); the cap-param test keeps an explicit 512 design (still exercises the clamp); spec §5.3.3 updated (default, warning content, the 60 dB rule of thumb). Gate: pytest 1288 passed / 64 skipped (headless tier), coverage 93.59 %; ruff + mypy clean.- DEFAULT_NOTCH_PASSBAND_RIPPLE_DB 0.05 -> 0.1 dB (operator decision: the equiripple design buys rejection depth at the same tap count with a larger allowed passband ripple — measured in the explorer's sweep: 0.1 dB @ 128 taps already reaches -60 dB). The transition band is UNTOUCHED (operator instruction) — records stay operator data. - The validator docstring, the default premise tests (Settings defaults + tolerant-load), the settings-dialog field-shape premise ('0.1') and spec §5.3.3 (default + the rule-of-thumb sentence) follow. The stopband-weight math tests keep explicit 0.05 dB calls (they pin the formula, not the default). Gate: pytest 1288 passed / 64 skipped (headless tier), coverage 93.59 %; ruff + mypy clean.