Skip to content

Commit

Permalink
small style changes to the code
Browse files Browse the repository at this point in the history
  • Loading branch information
johbackm committed Jan 19, 2024
1 parent 59d2777 commit 8fb65dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pysp2/util/leo_fit.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np
#import matplotlib.pyplot as plt
from .peak_fit import _gaus
from scipy.optimize import curve_fit

Expand Down Expand Up @@ -114,7 +113,8 @@ def beam_shape(my_binary, beam_position_from='peak maximum', Globals=None):
np.argmax(beam_profile), 20.,
np.nanmin(beam_profile)]).astype(float)
#fit gaussian curve
#coeff[amplitude, peakpos, width , baseline]
coeff, var_matrix = curve_fit(_gaus, bins[:fit_to], beam_profile[:fit_to],
p0=p0, method='lm', maxfev=40, ftol=1e-3)

return coeff, beam_profile
return coeff, beam_profile

0 comments on commit 8fb65dc

Please sign in to comment.