Skip to content

Commit

Permalink
Merge pull request #329 from lsst/tickets/DM-44990
Browse files Browse the repository at this point in the history
DM-44990: ip_diffim fails with lmfit=1.3.1
  • Loading branch information
parejkoj authored Jun 26, 2024
2 parents f907d66 + a3ced6f commit f375526
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/lsst/ip/diffim/dipoleFitTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,10 @@ def dipoleModelFunctor(x, flux, xcenPos, ycenPos, xcenNeg, ycenNeg, fluxNeg=None
modelFunctor = dipoleModelFunctor # dipoleModel.makeModel does not work for now.
# Create the lmfit model (lmfit uses scipy 'leastsq' option by default - Levenberg-Marquardt)
# We have to (later) filter out the nans by hand in our input to gmod.fit().
gmod = lmfit.Model(modelFunctor, verbose=verbose)
# The only independent variable in the model is "x"; lmfit tries to
# introspect variables and parameters from the function signature, but
# gets it wrong for the model signature above.
gmod = lmfit.Model(modelFunctor, independent_vars=["x"], verbose=verbose)

# Add the constraints for centroids, fluxes.
# starting constraint - near centroid of footprint
Expand Down

0 comments on commit f375526

Please sign in to comment.