Skip to content

feat: drop _corrected suffix on merged CSV; mark raw histogram CSVs with _raw#45

Open
boringethan wants to merge 1 commit intonextfrom
feature/output-file-naming
Open

feat: drop _corrected suffix on merged CSV; mark raw histogram CSVs with _raw#45
boringethan wants to merge 1 commit intonextfrom
feature/output-file-naming

Conversation

@boringethan
Copy link
Copy Markdown
Contributor

Companion to OpenwaterHealth/openmotion-bloodflow-app#44.

Summary

  • omotion/ScanWorkflow.py:245 — merged CSV no longer gets the _corrected suffix ({ts}_{subject}_corrected.csv{ts}_{subject}.csv).
  • omotion/ScanWorkflow.py:703 — per-side raw histogram CSVs (gated on request.write_raw_csv) now get a _raw suffix.
  • SDK-bundled tools that read SDK output updated to accept BOTH old and new layouts:
    • scripts/view_corrected_scan.py — globs both legacy *_corrected.csv and new layouts.
    • stream-db/importer.pyFILENAME_RE regex accepts an optional _raw after the mask group.
  • Docs and data-processing script docstrings/help-text updated (docs/PipelineComparison.md, docs/SciencePipeline.md, data-processing/plot_corrected_scan.py, data-processing/compare_pipelines.py).

Internal Python symbols (corrected_path, ScanResult.corrected_path, corrected_columns, write_corrected_csv, etc.) deliberately untouched — they describe content semantics, not the filename. Renaming would be a separate semver-affecting change.

The bloodflow-app side already accepts both naming conventions on read (PR forthcoming on that repo against #44), so the two PRs can land independently.

Test plan

  • Run a scan against the SDK with write_raw_csv=False — output CSV is named {ts}_{subject}.csv (no _corrected).
  • Run a scan with write_raw_csv=True — per-side files named {ts}_{subject}_{side}_mask{mask:02X}_raw.csv.
  • scripts/view_corrected_scan.py still loads both legacy fixtures and new-style outputs.
  • stream-db/importer.py parses both old and new per-side filenames.

🤖 Generated with Claude Code

…ith _raw

Per OpenwaterHealth/openmotion-bloodflow-app#44, the SDK now writes the merged
dark-baseline-corrected CSV as `<timestamp>_<subject>.csv` (was
`<timestamp>_<subject>_corrected.csv`) and tags per-side raw histogram CSVs
with a `_raw` suffix (`<timestamp>_<subject>_<side>_mask##_raw.csv`, was
`<timestamp>_<subject>_<side>_mask##.csv`).  Internal Python symbols
(`corrected_path`, `corrected_columns`, `write_corrected_csv`,
`ScanResult.corrected_path`) keep their names — only the on-disk filename
changed; the file content is still dark-baseline-corrected.

The bloodflow-app reader already tolerates both naming conventions
(commit 44d08b2 on feature/44-output-file-naming).  SDK-bundled consumers of
SDK output (`scripts/view_corrected_scan.py`, `stream-db/importer.py`) gain
the same back-compat tolerance so historical scan_data folders keep loading.
`data-processing/{plot_corrected_scan,compare_pipelines}.py` accept user-
supplied paths unchanged; only their docstrings and `--help` text were
refreshed to describe the new convention while noting the legacy form is
still accepted.

Docs (`docs/PipelineComparison.md`, `docs/SciencePipeline.md`) updated to
match.  No test fixtures renamed — those are archived real captures whose
filenames are part of the recorded artefact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant