Repository navigation
ASM peaks carry their baseline; release 1.5.4 - #80
Merged
Merged
Conversation
from_asm read a peak's times, area, height and symmetry, and dropped everything that says what the area was measured from. An Empower export records it for every peak: the integration type at each edge, the Start and End Height (how far the trace sits above the baseline at each edge), and where the baseline under the peak's cluster begins and ends. With the heights, the line from (start, trace - start height) to (end, trace - end height) reproduces the file's area for 99.6% of 11,040 real Empower peaks; the misses are edges moved by hand. They now arrive as baseline_start_code and baseline_end_code (B, V, S, T, ..., lowercase for a hand-moved edge, a group's "Gp" split into "G" and "p"), start_height and end_height in the signal's unit, and the baseline edges. The schema does not define "baseline value at start of peak"; Empower fills it with a time in seconds, while its name reads as a signal value. The unit decides: a time is read into baseline_start_time and baseline_end_time in minutes, a signal value into baseline_start_value and baseline_end_value, and a bare number into neither. Each is None when absent or not of its type, and each is written again on export, so the lap keeps them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZZc1jNciuVx7aekxG7YRR
The edge heights were read in whatever unit the document named, and subtracted from a trace in mAU. They are now converted by the absorbance unit table, with Empower's microvolt added (1 uV is 1 uAU), and an unknown unit reads as None rather than as a number in the wrong unit. The export writes the converted mAU value. The codes and baseline times are not in the REC/2026/06 schema. They are now written under the peak's custom information aggregate document, which the schema does define, with Empower's labels, and read from either the peak or its custom information. A baseline time needs s or min; any other unit gives None. The baseline_*_value keys are dropped: until a document fills that field with a signal value, one field maps to one key. A code is stripped, and a blank one reads as None. A small real Empower excerpt (three valley-split peaks and the trace under them, anonymous, times shifted to zero) now shows that trace minus the edge heights reproduces each reported area within 1%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZZc1jNciuVx7aekxG7YRR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZZc1jNciuVx7aekxG7YRR
The export labels a peak's height mAU and its area mAU.s, but the reader took both as numbers whatever unit the document named, so a peak list in AU or in Empower's microvolts was written a thousand times off under a unit it was not in. Height, area and the edge heights now share one conversion: AU and uV (and AU.s and uV.s) convert to mAU, an unknown unit reads as None, and a value with no unit is still taken as the schema's mAU. A microvolt document is tested from read to export. The peaks' custom-information warnings now share one set per read, so a complaint repeated across peaks and documents is made once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZZc1jNciuVx7aekxG7YRR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZZc1jNciuVx7aekxG7YRR
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.
rb.from_asmpeaks now carry the baseline each one was integrated from, and read height and area by their unit. Release 1.5.4.baseline_start_code/baseline_end_code,start_height/end_height(mAU), andbaseline_start_time/baseline_end_time(min).(start, trace − start_height)to(end, trace − end_height)reproduces the reported area within 1% for 99.6% of 11,040 peaks.heightandareaconvert from AU or µV to mAU and mAU·s, and an unknown unit reads asNone.🤖 Generated with Claude Code
https://claude.ai/code/session_01BZZc1jNciuVx7aekxG7YRR