Commit 55e812f
Fix Kendrick base consistency between MSPeak and MolecularFormula
Two related fixes for Kendrick base handling:
1. MolecularFormulaBase.__init__ fallback used hardcoded {"C":1,"H":2}
instead of MSParameters.ms_peak.kendrick_base, so molecular formulas
without a parent peak ignored user-configured Kendrick base.
2. MSPeak.change_kendrick_base() now recalculates KMD on all associated
molecular formulas, so they stay consistent when
change_kendrick_base_all_mspeaks() is called after formula assignment.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 0176770 commit 55e812f
2 files changed
Lines changed: 7 additions & 1 deletion
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
| |||
0 commit comments