Weights argument error when using multifit

28 views
Skip to first unread message

Andrew Thron

unread,
Apr 9, 2014, 8:34:36 PM4/9/14
to hypersp...@googlegroups.com
Francisco, 

Sorry, I found one other bug. When I use the multifit routine to fit a Voigt function to my ZLP I keep getting the error message "DeprecationWarning: The `weights` argument is deprecated and will be removed in the next release". The error message appears continuously until the fitting routine stops. I am not using any weights for the fitting routine. I was using the MPFIT optimizer with bounds, and I tried removing the bounds and switching to the least squares optimizer, but I still get the same message. I also specified weights=None for the multifit routine, but the error message still shows up. The multifit routine still fits Voigt function well, I just get hundreds of lines of text from the error message showing up on the notebook. 

Cheers, 
Andrew 

Francisco de la Peña

unread,
Apr 16, 2014, 4:47:32 AM4/16/14
to hypersp...@googlegroups.com
Andrew,

Thank you for reporting this. I have tried to reproduce it but I couldn't. Which version of HyperSpy are you using? Could you send us the code that triggers the bug?

Thanks!

Francisco


--
You received this message because you are subscribed to the Google Groups "hyperspy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hyperspy-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Thron

unread,
Apr 16, 2014, 2:45:50 PM4/16/14
to hypersp...@googlegroups.com
Francisco, 

I am using the latest version of HyperSpy 0.7 downloaded from the link on the website. I downloaded the Python installer, rather then the "Full installer" , and I installed it with my Anaconda software package. The code that trigger the bug is in the model  module in Hyperspy. I attached module to the post. 

Cheers, 
Andrew 
model.py

Andrew Thron

unread,
Apr 16, 2014, 2:53:10 PM4/16/14
to hypersp...@googlegroups.com
Francisco, 

One last detail. The error message occurs on line 977 of model module. 

Cheers, 
Andrew 

On Wednesday, April 16, 2014 1:47:32 AM UTC-7, Francisco wrote:

Tomas Ostasevicius

unread,
Apr 17, 2014, 5:07:51 AM4/17/14
to hypersp...@googlegroups.com
Hi Andrew,
Thanks for the bug report!
You get the weights error because it was (apparently) not removed cleanly enough.
I implemented a quick fix in https://github.com/hyperspy/hyperspy/pull/281
so as soon as it is merged, the latest version should be without the bug

Best wishes,
Tomas

Francisco de la Peña

unread,
Apr 17, 2014, 5:13:39 AM4/17/14
to hypersp...@googlegroups.com
Hi Andrew and Tomas,

I have just merged Tomas' fix. As usual you can upgrade to the development version using the following command:


Thank you Andrew for reporting this and Tomas for fixing it,

Francisco
Reply all
Reply to author
Forward
0 new messages