Traceback (most recent call last):
File "SD_fit.py", line 512, in <module>
fit(arguments)
File "SD_fit.py", line 206, in fit
fit_hc_a(q, r, p)
File "SD_fit.py", line 461, in fit_hc_a
result = minner.minimize()
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/lmfit/minimizer.py", line 2176, in minimize
return function(**kwargs)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/lmfit/minimizer.py", line 1568, in leastsq
lsout = scipy_leastsq(self.__residual, variables, **lskws)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/scipy/optimize/minpack.py", line 383, in leastsq
shape, dtype = _check_func('leastsq', 'func', func, x0, args, n)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/scipy/optimize/minpack.py", line 26, in _check_func
res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/lmfit/minimizer.py", line 530, in __residual
out = self.userfcn(params, *self.userargs, **self.userkws)
File "SD_fit.py", line 456, in fcn2mmin
model = smdls.HC_angular(q, amp, background, radius, pd, roughness, angle)
File "/home/shankar/SD_1D_SAXS/models/Special_Models.py", line 35, in HC_angular
def f(z,theta,q):
File "/home/shankar/SD_1D_SAXS/models/Special_Models.py", line 29, in jit_integrand_function
def wrapped(n, xx):
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/decorators.py", line 259, in wrapper
res.compile()
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/compiler_lock.py", line 32, in _acquire_compile_lock
return func(*args, **kwargs)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/ccallback.py", line 70, in compile
cres = self._compile_uncached()
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/ccallback.py", line 84, in _compile_uncached
cres = self._compiler.compile(sig.args, sig.return_type)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/dispatcher.py", line 81, in compile
raise retval
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/dispatcher.py", line 91, in _compile_cached
retval = self._compile_core(args, return_type)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/dispatcher.py", line 104, in _compile_core
cres = compiler.compile_extra(self.targetdescr.typing_context,
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/compiler.py", line 551, in compile_extra
return pipeline.compile_extra(func)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/compiler.py", line 331, in compile_extra
return self._compile_bytecode()
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/compiler.py", line 393, in _compile_bytecode
return self._compile_core()
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/compiler.py", line 373, in _compile_core
raise e
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/compiler.py", line 364, in _compile_core
pm.run(self.state)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/compiler_machinery.py", line 347, in run
raise patched_exception
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/compiler_machinery.py", line 338, in run
self._runPass(idx, pass_inst, state)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/compiler_lock.py", line 32, in _acquire_compile_lock
return func(*args, **kwargs)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/compiler_machinery.py", line 302, in _runPass
mutated |= check(pss.run_pass, internal_state)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/compiler_machinery.py", line 275, in check
mangled = func(compiler_state)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/typed_passes.py", line 89, in run_pass
typemap, return_type, calltypes = type_inference_stage(
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/typed_passes.py", line 67, in type_inference_stage
infer.propagate(raise_errors=raise_errors)
File "/home/shankar/anaconda3/envs/Double_Int/lib/python3.8/site-packages/numba/typeinfer.py", line 985, in propagate
raise errors[0]
numba.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
Untyped global name 'radius': cannot determine Numba type of <class 'lmfit.parameter.Parameter'>
File "models/Special_Models.py", line 44:
def g_distribution(z, radius, pd):
<source elided>
return ff(theta,z,q)*g_distribution(z,radius,pd)* sin(theta)
^
[1] During: resolving callee type: type(CPUDispatcher(<function HC_angular.<locals>.f at 0x7ff57d998790>))
[2] During: typing of call at /home/shankar/SD_1D_SAXS/models/Special_Models.py (31)
[3] During: resolving callee type: type(CPUDispatcher(<function HC_angular.<locals>.f at 0x7ff57d998790>))
[4] During: typing of call at /home/shankar/SD_1D_SAXS/models/Special_Models.py (31)
File "models/Special_Models.py", line 31:
def wrapped(n, xx):
<source elided>
ar = nb.carray(xx, n)
return jitted_function(ar[0], ar[1], ar[2])
^