FA-91460 / Digital signal filters / Member archive
Median filter window stops one sample early · case 05
The window is asymmetric and lags the signal by half a sample.
Case contract
Input [K, samples]; K odd ("bad-kernel" otherwise). Output i is the median of samples[i-K//2 .. i+K//2] clipped to the valid range (shrinking windows at the edges); an even count uses the mean of the two middle values. Return exact fraction strings.
Why this case matters
Median filters remove impulse noise without blurring edges; window or tie handling slips shift features.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: random median 18 | ["5/2", "8", "5/2", "3", "-2"] | ["8", "5/2", "-2", "3", "-2"] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗