Skip to content

Commit

Permalink
Merge pull request #110 from arwoll/edd-spring2024
Browse files Browse the repository at this point in the history
Tests confirm x MUST == unconstrainted_fit_centers after all
  • Loading branch information
rolfverberg authored Mar 5, 2024
2 parents 42294f3 + 8138c91 commit c3afd12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CHAP/edd/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,14 +870,14 @@ def calibrate(self,
a_init, b_init, c_init = detector.energy_calibration_coeffs
if quadratic_energy_calibration:
fit = Fit.fit_data(
unconstrained_fit_centers, 'quadratic', x=_fit_E0,
_fit_E0, 'quadratic', x=unconstrained_fit_centers,
nan_policy='omit')
a_fit = fit.best_values['a']
b_fit = fit.best_values['b']
c_fit = fit.best_values['c']
else:
fit = Fit.fit_data(
unconstrained_fit_centers, 'linear', x=_fit_E0,
_fit_E0, 'linear', x=unconstrained_fit_centers,
nan_policy='omit')
a_fit = 0.0
b_fit = fit.best_values['slope']
Expand Down

0 comments on commit c3afd12

Please sign in to comment.