Skip to content

label fit: fit_group's trace weights, profiles and normal equations as functions; 289 -> 225 lines - #569

Merged
ypriverol merged 1 commit into
mainfrom
refactor/fit-group-250
Nov 25, 2026
Merged

ypriverol merged 1 commit into
mainfrom
refactor/fit-group-250

Conversation

@ypriverol

Copy link
Copy Markdown
Contributor

Splits fit_group in crates/quant/src/label/fit.rs (289 -> 225 lines) under the 250-line budget, moving code without changing it:

  • trace_weights: each trace's inverse noise variance (robust sigma off-peak, floored at half the detection limit).
  • centred_profiles: the channels' centred Gaussian elution profiles (was the profiles closure, which now calls it).
  • normal_equations: the weighted normal equations of the channel amplitudes (was the body of the normal closure; Normal names its result).

Every float is computed by the same expression in the same order, so the fits are unchanged. The label-quant tests pass.

fn_lines.tsv: drops label/fit.rs::fit_group.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 20d5fb7a-f5aa-49f5-9de7-0b9582ec0c88
Commits

Reviewing files that changed from the base of the PR and between c6cc2ef and bdc3cb4.

Files ignored due to path filters: 1

  • crates/andes/tests/ratchets/fn_lines.tsv is excluded by !**/*.tsv
Files selected for processing: 1

  • crates/quant/src/label/fit.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@ypriverol
ypriverol merged commit a5506e9 into main Nov 25, 2026
4 checks 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.

1 participant