Summary
PlanckianFitComputer.evaluate() is invariant under the exact reparameterization
$$x_0 \to k,x_0, \qquad \sigma \to k,\sigma, \qquad \mathrm{amp} \to \mathrm{amp}/k^5$$
The curve is bit-identical (verified: max|diff| = 0.0 for k = 2). Only the combinations x0/sigma and amp·x0⁵ are observable, so the individual values of x0, sigma and amp returned to the user are meaningless — they depend solely on where the optimiser happened to start.
Secondary defect
The docstring and the DataLab GUI label call x0 the peak wavelength (Wien's displacement law). This is false unless sigma == 1:
sigma |
argmax for x0 = 1 |
| 0.5 |
2.0165 |
| 1.0 |
1.0060 |
| 2.0 |
0.5008 |
The maximum sits at approximately 1.007·x0/sigma.
Proposed resolution
Two options, to be decided before implementation:
- Reparameterize to three genuinely independent parameters, e.g.
(peak_amplitude, peak_position, y0) with the Planck shape fully determined by peak_position — removes the degeneracy and makes the reported peak position correct by construction. Breaking change for stored fit_params.
- Keep the model and document the degeneracy explicitly, renaming
x0 so it no longer claims to be the peak wavelength.
The branch fix/fitting-audit implements option 2 (documentation and label only) so the currently misleading claim disappears immediately; option 1 remains open.
Summary
PlanckianFitComputer.evaluate()is invariant under the exact reparameterizationThe curve is bit-identical (verified:
max|diff| = 0.0fork = 2). Only the combinationsx0/sigmaandamp·x0⁵are observable, so the individual values ofx0,sigmaandampreturned to the user are meaningless — they depend solely on where the optimiser happened to start.Secondary defect
The docstring and the DataLab GUI label call
x0the peak wavelength (Wien's displacement law). This is false unlesssigma == 1:sigmaargmaxforx0 = 1The maximum sits at approximately
1.007·x0/sigma.Proposed resolution
Two options, to be decided before implementation:
(peak_amplitude, peak_position, y0)with the Planck shape fully determined bypeak_position— removes the degeneracy and makes the reported peak position correct by construction. Breaking change for storedfit_params.x0so it no longer claims to be the peak wavelength.The branch
fix/fitting-auditimplements option 2 (documentation and label only) so the currently misleading claim disappears immediately; option 1 remains open.