Skip to content

Commit

Permalink
fix(cal_utils): different fix for ruff linting error (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssiegelx authored Aug 6, 2024
1 parent 54c02c4 commit f9dfc4b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ch_util/cal_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,16 +965,15 @@ def _fit(
# Calculate vandermonde matrix
A = self._vander(ha, self.poly_deg_amp)
center = 0.0
coeff = None

# Iterate to obtain model estimate for amplitude
for kk in range(niter):
wk = w0 * model_amp**2

if window is not None:
if kk > 0:
raise RuntimeError("coeff is not defined")
# Where is `coeff` supposed to be defined?
# center = self.peak(param=coeff)
center = self.peak(param=coeff)

if np.isnan(center):
raise RuntimeError("No peak found.")
Expand Down

0 comments on commit f9dfc4b

Please sign in to comment.