feat: add parameterGroup options to share variables between peaks#126
Open
jobo322 wants to merge 4 commits into
Open
feat: add parameterGroup options to share variables between peaks#126jobo322 wants to merge 4 commits into
jobo322 wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #126 +/- ##
==========================================
+ Coverage 96.52% 97.76% +1.24%
==========================================
Files 9 11 +2
Lines 230 358 +128
Branches 39 70 +31
==========================================
+ Hits 222 350 +128
Misses 8 8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lpatiny
reviewed
Jun 19, 2026
b3535b4 to
116dd5f
Compare
lpatiny
reviewed
Jun 30, 2026
| @@ -0,0 +1,220 @@ | |||
| import type { DataXY } from 'cheminfo-types'; | |||
Member
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.

Refactor: introduce
OptimizationLayoutandparameterGroupsSummary:
This PR extracts optimizer-to-peak parameter mapping into a dedicated layout builder and adds linked parameters through
parameterGroups. Multiple peak parameters can now share one optimization variable with optional factor and offset, without changing the optimizer itself.Key changes:
buildOptimizationLayoutto centralize optimizer variable mapping.reconstructPeaksto centralize peak reconstruction.optimize()and the fixed-parameter path to use the new layout/reconstruction helpers.OptimizeOptions.parameterGroupsplusParameterGroupandParameterGroupMember.gradientDifferenceis computed conservatively asmin(member.gradientDifference / |factor|).Compatibility:
parameterGroupsis not provided.