docs+feat: decode LC Raw Data/Chromatogram Ch6, characterize Ch5's untestable grammar (#21)#22
Merged
Nathan-D-R merged 1 commit intoJul 21, 2026
Conversation
Ch5/Ch6 share the same RC\x00\x00 segment header as the still-unsolved PDA payload, but the single giant per-channel segment turns out to have its own internal "page" framing (u16 length-prefixed/suffixed blocks of up to 256 samples) and a clean, exhaustively-verified literal/wide-token tokenization split. Cumulative-summing the decoded deltas produces a smooth, physically plausible chromatogram in every one of the 5 locally available PXD020792 files for Ch6. Ch5 shares the identical framing but is a single repeated value for its entire run in every available file, which makes its numeric grammar (delta vs. absolute-value convention) untestable from this corpus - crates/openszraw::raw::lc_chrom deliberately skips emitting it rather than guess, per the project's clean-room honesty policy. Wires Ch6 into Reader::iter_chromatograms via openmassspec-core's SpectrumSource trait, tagged with PSI-MS MS:1000811 "electromagnetic radiation chromatogram". Partially resolves Sigilweaver#21. Claude-Session: https://claude.ai/code/session_01ETdxFx6Mb8XcZqctf1AHtF
Nathan-D-R
force-pushed
the
lc-chromatogram-ch5-ch6-decode
branch
from
July 21, 2026 00:58
cffbd6e to
7860be0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #21 (decode the
LC Raw Data/Chromatogram Ch5/Ch6stream found while investigating #2) -Ch6is decoded and wired into the reader;Ch5is a confirmed, evidence-backed partial characterization, deliberately left undecoded.Confirmed, byte-exact (all 5 locally available
PXD020792/*.LCDfiles, both channels, 290 pages total, zero exceptions):RC\x00\x00segment (one giant segment per channel, as issue Decode LC Raw Data/Chromatogram Ch5 / Ch6 stream (found while investigating #2) #21 already noted) has internal sub-segment structure that hadn't been characterized yet: the body is a back-to-back sequence of "pages", each au16LE byte-length prefix, that many data bytes, then a matchingu16LE suffix - the same "symmetric" length-wrapper style already documented for PDA segments, just applied per-page.< 0x20is a signed 5-bit literal delta, a byte>= 0x20starts a 2-byte signed-13-bit wide delta. This(threshold=0x20, width=2)rule is the unique zero-exception result of an exhaustive(threshold, width)sweep.Corroborated, not byte-exact-proven: cumulative-summing the decoded deltas produces a smooth, physically plausible chromatogram (baseline, broad rise, stable plateau) for
Ch6in every file, clearly outperforming every alternative layout tried.Ch5- deliberately left undecoded: it shares the identical verified framing, but every sample in every available file is the same repeated token, which makes the delta-vs-absolute-value convention untestable from this corpus. Per this project's clean-room honesty policy, the reader skips emitting any channel with fewer than 2 distinct decoded values rather than guess and risk shipping a fabricated unbounded ramp.Rust implementation: new
crates/openszraw::raw::lc_chrommodule, wired intoReader'sSpectrumSource::iter_chromatograms(probing all 6 conventionalLC Raw Data/Chromatogram ChNnames generically, not hardcoded toCh5/Ch6). Records use PSI-MSMS:1000811"electromagnetic radiation chromatogram". Mirrors theiter_chromatogramswiring pattern from the sibling OpenWRaw#9.Full derivation and evidence in
docs/format/04-lcd-chromatogram-pda.md's "2026-07-21 session" section anddocs/format/06-known-limitations.md#11.Contributed by @Nabejo.
Test plan
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace(35 unit tests incl. 10 new forlc_chrom, plus 2 new corpus-conformance tests verifyingCh6decodes to a plausible trace andCh5is correctly skipped)