Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decompose.decompose() appears to be broken following lmfit v1.0.0 update #1

Open
nic-kill opened this issue Mar 13, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@nic-kill
Copy link

nic-kill commented Mar 13, 2020

may be an easy fix with the minimizer.py function? Not sure if that was in the previous version.

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-90-14e9c299597e> in <module>()
     48     decompose.single_prepared_spectrum = prepared_spectrum
     49 
---> 50     decomposition[f'{noise_level}'] = decompose.decompose()
     51     decomposition[f'{noise_level}']['input_spec'] = prepared_spectrum['data_list'][0]

~/.local/lib/python3.6/site-packages/gausspyplus-0.0.dev95-py3.6.egg/gausspyplus/decompose.py in decompose(self)
    172             self.log_output = False
    173             self.getting_ready()
--> 174             return self.start_decomposition()
    175         else:
    176             self.check_settings()

~/.local/lib/python3.6/site-packages/gausspyplus-0.0.dev95-py3.6.egg/gausspyplus/decompose.py in start_decomposition(self)
    245         say('\ndecomposing data...', logger=self.logger)
    246 
--> 247         from .gausspy_py3 import gp as gp
    248         g = gp.GaussianDecomposer()  # Load GaussPy
    249         g.set('use_ncpus', self.use_ncpus)

~/.local/lib/python3.6/site-packages/gausspyplus-0.0.dev95-py3.6.egg/gausspyplus/gausspy_py3/gp.py in <module>()
     13 import numpy as np
     14 
---> 15 from . import AGD_decomposer
     16 from . import gradient_descent
     17 from . import ioHDF5

~/.local/lib/python3.6/site-packages/gausspyplus-0.0.dev95-py3.6.egg/gausspyplus/gausspy_py3/AGD_decomposer.py in <module>()
     12 from scipy.interpolate import interp1d
     13 # from scipy.optimize import leastsq, minimize
---> 14 from lmfit import minimize as lmfit_minimize
     15 from lmfit import Parameters
     16 

ImportError: cannot import name 'minimize'
@mriener
Copy link
Owner

mriener commented May 26, 2020

Just checked, but I cannot reproduce the error. For me everything runs with python-3.6.10, lmfit-1.0.0, numpy-1.18.4, and scipy-1.4.1. Can you specify the version numbers of the individual packages that cause the error (via conda list or pip list)?

I recently upgraded GaussPy+ to v0.2 and this new version includes also fixes to ensure compatibility with Python 3.8. I tested the code with python-3.8.2, lmfit-1.0.1, numpy-1.18.4, and scipy-1.4.1, and everything ran okay.

I would recommend updating GaussPy+ to the newest version (v0.2) and if possible also updating the individual dependencies (lmfit, numpy, scipy) to the versions above.

@mriener mriener added the bug Something isn't working label May 26, 2020
@mriener mriener self-assigned this May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants