Skip to content

Commit

Permalink
Changed to use DogBoxLSQFitter instead of LMLSQFitter in '_fit_trace'…
Browse files Browse the repository at this point in the history
… when modeling the peak as a gaussian.
  • Loading branch information
hpparvi committed Nov 26, 2024
1 parent 2292795 commit ed5c3b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions specreduce/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ class FitTrace(Trace, _ImageParser):
or `~astropy.modeling.spline.Spline1D`, optional
The 1-D polynomial model used to fit the trace to the bins' peak
pixels. Spline1D models are fit with Astropy's
'SplineSmoothingFitter', while the other models are fit with the
'SplineSmoothingFitter', generic linear models are fit with the
'LinearLSQFitter', while the other models are fit with the
'LMLSQFitter'. [default: ``models.Polynomial1D(degree=1)``]
peak_method : string, optional
One of ``gaussian``, ``centroid``, or ``max``.
Expand Down Expand Up @@ -295,7 +296,7 @@ def _fit_trace(self, img):
offset_init = models.Const1D(np.ma.median(ztot))
profile = g1d_init + offset_init

fitter = fitting.LMLSQFitter()
fitter = fitting.DogBoxLSQFitter()
popt_tot = fitter(profile, yy, ztot)

# restrict fit to window (if one exists)
Expand Down

0 comments on commit ed5c3b8

Please sign in to comment.