RiceMunk / omnifit

This is a package for doing ice spectroscopy fitting of interstellar ices.
https://ricemunk.github.io/omnifit/
6 stars 5 forks source link

Fitting fails on 0.2.1rc1 #22

Closed RiceMunk closed 8 years ago

RiceMunk commented 8 years ago

Running the example full fit (see example in documentation) seemingly does the fit successfully, but never modifies fit parameters from their original guesses. Figure of expected fit result as shown in example is not reproduced.

This seems to happen on fresh installs of Omnifit using the dependencies installed through PyPi, so it may be related to some change which has happened in newer version of the dependencies; probably in ones involving minimization.

eteq commented 8 years ago

@RiceMunk - is this using the astropy fitting machinery? If so, by design that doesn't modify the initial model, but instead outputs a new model when the fitter is called on a model.

RiceMunk commented 8 years ago

It's currently using lmfit, which as far as I'm aware uses scipy. I'm planning on looking at how well astropy fitting would work with what I want omnifit to do, but haven't done so yet. This might be an excuse to take a look at it, though, but we'll see.

Anyhow, the fitting has worked before, so some functionality somewhere must have changed with either lmfit or scipy. Still looking into this, but been busy with other stuff lately.

RiceMunk commented 8 years ago

The related commit seems to have fixed this, so closing the issue. It was a problem with how lmift 0.9.x had changed how it stores the fit results compared to previous versions, and omnifit was thus storing its fit results incorrectly as well.

Also for the record, created issue #23 to remind me to check whether astropy.modeling might make more sense as a fitting engine for omnifit. I can at least see the value of using astropy.modeling in the fact that it would allow omnifit to (sort of) have one less dependency to stay caught up with.