Skip to content

Fix uncalibrated image conversion - #64

Merged
sander-willems-bruker merged 2 commits into
mainfrom
fix/uncalibrated_im_conversion
Sep 11, 2026
Merged

sander-willems-bruker merged 2 commits into
mainfrom
fix/uncalibrated_im_conversion

Conversation

@sander-willems-bruker

Copy link
Copy Markdown
Collaborator

Adjust the im conversion logic to correctly calculate the intercept and slope, ensuring accurate conversion between scan indices and im values.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Use the final valid scan index (NumScans - 1) when calculating the slope.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Fixes uncalibrated image conversion by updating scan-index and ion-mobility calculations.

Changes:

  • Uses direct linear interpolation from raw IM boundaries.
  • Updates forward and reverse conversion formulas.
  • Removes unnecessary square-root and squaring operations.
File summaries
File Review
crates/timsrust-tdf/src/calibration.rs Conversion formulas updated, but scan_max_index uses the scan count instead of the final valid index, causing an endpoint mapping error.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread crates/timsrust-tdf/src/calibration.rs
@sander-willems-bruker
sander-willems-bruker marked this pull request as ready for review September 11, 2026 13:20
@sander-willems-bruker
sander-willems-bruker merged commit 3e3f3d0 into main Sep 11, 2026
1 check passed
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.

2 participants