Skip to content

Cal drift: track cable-loss .s2p history alongside cal runs #57

@RFingAdam

Description

@RFingAdam

Background

Cable insertion loss is a common source of chamber drift (connector wear, cable flex fatigue). The active-cal drift tracker records the generated TRP Cal file + reference-file metadata, but it does not currently capture cable-loss measurements (.s2p Touchstone files) that operators run during a full cal session.

Goal

Extend drift tracking so .s2p cable-loss files measured during or alongside an active cal are ingested as a third cal type, with their own compare + plot workflow.

Acceptance Criteria

  • Parser for .s2p Touchstone format added to plot_antenna/cal_drift.py (S21 magnitude over frequency; dB or linear input both accepted).
  • .s2p files appear as cal_type = "cable_loss" rows in runs.csv.
  • GUI dialog can ingest a directory of .s2p files and compare any two for drift (ΔdB vs frequency, single-pol plot — no H/V split).
  • MCP cal_drift_ingest recognizes .s2p files alongside TRP Cal *.txt.
  • Tests: fixture .s2p file + parse/compare tests.
  • At least one real-world .s2p pair (when available) ingests cleanly and produces a drift plot.

Notes

  • User noted they do not currently have a consistent archive of historical .s2p files — this may need to start building an archive from the next cal onward. Prioritize accordingly.
  • Consider: should cable-loss drift automatically subtract from active-cal drift numbers? That is a debatable correction — capture the raw numbers first, leave correction as a separate flag/feature.

Related: v1 tracker at plot_antenna/cal_drift.py. Existing RF tool scikit-rf is not currently a dependency; evaluate whether to add it vs. hand-roll a minimal Touchstone parser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions