neutrons / licorne-py Goto Github PK
View Code? Open in Web Editor NEWPort of LICORNE program to Python
License: GNU General Public License v3.0
Port of LICORNE program to Python
License: GNU General Public License v3.0
Given an experimental profile and resolution settings, calculate the Chi-square using a simulated profile
Add tests for layer
and related objects from PR #6
Hi developers,
I ran into another problem while doing the Licorne fit to my experimental data. I have attached the yaml file associated with this error. I think that the minimizer might have diverged the chi value to an unrealistic value leading to this error.
Thanks!
Traceback (most recent call last):
File "/home/georgeyumnam/Work/Honey-Comb-lattice-DWBA/MAGREF/Licorne-Py/licorne/fit_worker.py", line 57, in run
result=minimize(self.calculate_residuals, parameters,method=lu.get_minimizer())
File "/usr/local/lib/python2.7/dist-packages/lmfit/minimizer.py", line 2274, in minimize
return fitter.minimize(method=method)
File "/usr/local/lib/python2.7/dist-packages/lmfit/minimizer.py", line 1926, in minimize
return function(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/lmfit/minimizer.py", line 1464, in leastsq
lsout = scipy_leastsq(self.__residual, variables, **lskws)
File "/home/georgeyumnam/.local/lib/python2.7/site-packages/scipy/optimize/minpack.py", line 394, in leastsq
gtol, maxfev, epsfcn, factor, diag)
File "/usr/local/lib/python2.7/dist-packages/lmfit/minimizer.py", line 533, in __residual
nan_policy=self.nan_policy)
File "/usr/local/lib/python2.7/dist-packages/lmfit/minimizer.py", line 2140, in _nan_policy
raise ValueError("The input contains nan values")
ValueError: The input contains nan values
Hi developers,
I am getting the following error while working with the Licorne-Py GUI.
I was trying to fit the MSLD of an experimental data with 26 layers of thickness "10" each,
After finally setting up the NSLD for the 26 Layers, and finally hitting the "fit" tab, licorne shuts down immediately, and gives this error.
Traceback (most recent call last):
File "/home/georgeyumnam/Work/Honey-Comb-lattice-DWBA/MAGREF/Licorne-Py/licorne/fit_worker.py", line 57, in run
result=minimize(self.calculate_residuals, parameters,method=lu.get_minimizer())
File "/usr/local/lib/python2.7/dist-packages/lmfit/minimizer.py", line 2274, in minimize
return fitter.minimize(method=method)
File "/usr/local/lib/python2.7/dist-packages/lmfit/minimizer.py", line 1926, in minimize
return function(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/lmfit/minimizer.py", line 1464, in leastsq
lsout = scipy_leastsq(self.__residual, variables, **lskws)
File "/home/georgeyumnam/.local/lib/python2.7/site-packages/scipy/optimize/minpack.py", line 383, in leastsq
shape, dtype = _check_func('leastsq', 'func', func, x0, args, n)
File "/home/georgeyumnam/.local/lib/python2.7/site-packages/scipy/optimize/minpack.py", line 27, in _check_func
res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))
File "/usr/local/lib/python2.7/dist-packages/lmfit/minimizer.py", line 518, in __residual
out = self.userfcn(params, *self.userargs, **self.userkws)
File "/home/georgeyumnam/Work/Honey-Comb-lattice-DWBA/MAGREF/Licorne-Py/licorne/fit_worker.py", line 51, in calculate_residuals
self.chiSquaredChanged.emit((chi**2).mean())
File "/home/georgeyumnam/.local/lib/python2.7/site-packages/numpy/core/_methods.py", line 70, in _mean
ret = umr_sum(arr, axis, dtype, out, keepdims)
ValueError: operands could not be broadcast together with shapes (214,) (215,)
Also, Licorne-Py shuts down completely and closes the window without saving the work if an error is made while setting the NSLD or thickness. For example, while setting NSLD, I accidentally set the value to 3.1-6 instead of 3.1e-6, and this resulted in a core dumped error shutting down the window completely without saving the work in progress.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.