Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

resample_poly destroys the drive's periodicity (53% on the last period) — live in RTSfreerunBackend

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
numpy, python
Domain
backend

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

bug

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CaltechExperimentalGravity/system_ident

All issues in CaltechExperimentalGravity/system_ident

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.