Skip to content

scan_start_time: float -> double - #18

Merged
pjones merged 1 commit into
trunkfrom
pjones/scan2
Sep 1, 2026
Merged

pjones merged 1 commit into
trunkfrom
pjones/scan2

Conversation

@pjones

@pjones pjones commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Should actually be float64.

See: HUPO-PSI/mzPeak-specification#22

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: c0ed00b4-de20-4540-b1b1-f7bee23430d8


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pjones
pjones merged commit dada6cf into trunk Sep 1, 2026
3 checks passed
@pjones
pjones deleted the pjones/scan2 branch September 1, 2026 11:30
okohlbacher added a commit to okohlbacher/mzpeak-openms that referenced this pull request Sep 12, 2026
… write

The specification example schema moved scan_start_time from float32 to double
in spec d0c16b3, following the same change upstream made in PR OpenMS#18.  Two sites
here were still pinned to the narrower width.

On READ the column was fetched through opt_float, which narrows to float32
before the caller widens it back to double for the x60 conversion to seconds.
Reading a file that stores the column as double therefore discarded precision
for no reason -- exactly the precision the upstream change set out to keep.
opt_double is already width-agnostic (it dispatches on the Arrow type and
accepts DOUBLE, FLOAT and the integer widths), so switching to it is a no-op on
a float32 column -- widening a value that came from float32 is exact -- and
lossless on a float64 one.  The two earliest_scan maps widen to match.

On WRITE both scans facets emitted arrow::float32().  They now emit
arrow::float64(), which is what the specification prefers and what the
reference writer produces.  Verified rather than assumed: the archive written
by scripts/e2e.sh now carries scan_start_time as `double`, and T2 confirms the
Rust reference still reads it.

The comments claiming "scan_start_time is float32 while spectrum.time is
float64" are corrected; that premise no longer holds.  The agreement tolerance
deliberately stays at float32 scale, because the specification only prefers
double and a conformant file may still store either column narrow.

40/40 in debug, release and tsan; scripts/e2e.sh green with T2 and T5 PASS.

Co-Authored-By: Claude Opus 5 <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