resample_poly destroys the drive's periodicity (53% on the last period) — live in RTSfreerunBackend
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start in src/system_ident/backends/rtsfreerun_adapter.py at the resampling site around line 153 and read() around line 296, including _fit_periodic and np.resize. Trace how the shipped 256/16384 configuration reaches MockRTSModel and how the new CDSBackend.inject() should share the behavior. Done means the shipped ratio has per-period deviation below 1e-9 without resampling tiled data.
Written by the indexing model from the issue text.
Description
Stage B5 (spec §3.5). Present in shipped code today, not just a hazard for the new backend.
src/system_ident/backends/rtsfreerun_adapter.py:153 resamples the drive with
scipy.signal.resample_poly, and read() then tiles the resampled array via _fit_periodic /
np.resize (src/system_ident/backends/rtsfreerun_adapter.py:296). resample_poly's FIR sees the
zero-padded array ends, so the edge periods are corrupted — and tiling makes the corrupt period
recur forever.
Measured on an 8-period tiled multisine, per-period max deviation from the interior period:
6.90e-02 0 0 0 0 0 0 5.32e-01
The last period is off by 53%, the first by 6.9%. Resampling one period and then tiling is worse
still: a 5.33e-01 seam discontinuity.
Alternatives, measured against the resample_poly interior:
| approach | deviation |
|---|---|
scipy.signal.resample (FFT, exactly periodic) on one period, then tile |
8.6e-4 |
| regenerate the multisine at the target rate | exactly 0 |
Regeneration is exact and puts the line frequencies on exact bins of both grids.
This is exercised by shipped config: src/system_ident/configs/rtsfreerun_hsts.yml runs fs 256
against a 16384 Hz model (q = 64). Measured signature there: median H_err/|H| rises from 1.0e-9 to
1.8e-4 — so unlike the coherence-blindness issue it does self-flag, but it is still wrong.
Fix
Regenerate at the target rate where the design PSD is available; otherwise sig.resample on one period
then tile. Never resample_poly, never resample the tiled array. Assert the input length is an exact
multiple of the period. Apply at both this site and the new CDSBackend.inject().
Acceptance
Per-period deviation 5.32e-1 → <1e-9 at the shipped 256/16384 ratio, verified on MockRTSModel.
Campaign: CDS hardware backend · branch feat/cds-hardware-backend
· spec · plan · handoff
Code is deferred until the plan and issues have been reviewed.
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CaltechExperimentalGravity/system_ident
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in CaltechExperimentalGravity/system_ident
Similar issues
-
tests/strategies_test.py:174 goes uncovered on about 1 run in 100, failing the coverage ratchetOpenflaky-watch
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
btclib-org/btclib#2839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
nion-software/nionswift#2018 ·
Maintainers usually reply within 1 day
-
Deleting a member fails when another member's share transfer points to themPossibly taken @Beerlesklopfer claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
FoodCoopX/wirgarten-tapir#1336 ·
Maintainers usually reply within 3 days
-
pydanty:is-working
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
pydantic/pydantic-ai#11467 ·
Maintainers usually reply within 1 day
-
Link Checker ReportOpenautomated issue linkchecker report
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
QuantEcon/lecture-python.myst#1098 ·
Maintainers usually reply within 1 day