Skip to content

Frames.Polarity ground-truth column bypassed by mz_calibration_id heuristic #27

Description

@Nathan-D-R

Found during the 2026-07-24 cross-repo parity sweep - a leftover from the now-closed #8, which explicitly scoped this item 'optional, lower priority' and left it unfixed while shipping the other two items from that issue.

polarity_for() (crates/opentimstdf/src/mzml.rs:133-139) derives polarity from frame.mz_calibration_id (1 -> +, 2 -> -) rather than reading Frames.Polarity (TEXT "+"/"-", documented at docs/docs/format/01-tdf-sqlite-schema.md:47), which is never selected in either query in reader.rs (frame()/frames(), lines 238-239, 251-252) nor present on the Frame struct.

Still true today. Same-order-of-magnitude trivial fix (add one column to two SELECTs + one struct field). Severity: cosmetic/low - the heuristic is documented as intentional in CHANGELOG [1.2.0] and matches the FK-based polarity table correctly in all observed corpus bundles - but it's a leftover, not something newly resolved.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions