Skip to content

XIC: float64 window edge; isotope_trace_evidence span from the strongest trace - #14

Merged
lfu46 merged 1 commit into
mainfrom
xic-float64-edge-span-strongest
Oct 11, 2026
Merged

lfu46 merged 1 commit into
mainfrom
xic-float64-edge-span-strongest

Conversation

@lfu46

@lfu46 lfu46 commented Oct 11, 2026

Copy link
Copy Markdown
Owner

XIC: float64 window edge; isotope_trace_evidence span from the strongest trace

…or its span on the strongest trace

Two fixes from the NGlycoM012 feature-level QC review (2026-10-11).

- _window_intensity: a SpectrumCache stores m/z as float32, and `float32_array - python_float`
  stays float32 under NumPy's promotion rules, so the TARGET was rounded to float32 before the
  subtraction (about 0.06 ppm at m/z 1000) and a peak at the window edge could fall inside on an
  mzML and outside on the cache built from it. The edge is now tested in float64. Test: a sweep of
  targets over a float32 array must equal a float64 reference, and the float32 path must have
  disagreed somewhere in the sweep for the test to count.

- isotope_trace_evidence(span_from='mono' | 'strongest'): the half-maximum span the per-isotope
  intensities are summed over came from the M trace alone, so a large glycopeptide whose
  monoisotopic peak sits at the noise floor while M+1 and M+2 are clear yielded an empty span and
  read as absent rather than as a weak monoisotope. 'strongest' anchors on the tallest isotope
  trace and records it as span_trace; co-elution is then measured against that trace, so a
  lighter species one neutron below is still flagged when the assigned M is missing (the
  one-neutron-too-heavy case). Default 'mono' is unchanged: identical span, co-elution and
  m_minus_1 arithmetic, pinned by the existing tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@lfu46
lfu46 merged commit 8449287 into main Oct 11, 2026
@lfu46
lfu46 deleted the xic-float64-edge-span-strongest branch October 11, 2026 14:38
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