regarding g_fit.py

49 views
Skip to first unread message

Premkumar Thirumalaisamy

unread,
Feb 11, 2021, 1:05:33 AM2/11/21
to CoFFEE code forum
Dear experts,

While running the g_fit.py for the input given in the exaples.
I am encountering a following error...

"[RV@localhost Fit_gaussian]$ ~/CoFFEE_1.1/GaussianFit/g_fit.py in
('Shape of the data in the file:', (135, 135, 135))
Traceback (most recent call last):
  File "/home/RV/CoFFEE_1.1/GaussianFit/g_fit.py", line 247, in <module>
    popt, pcov = curve_fit(gaussian, (xx,yy,zz), vol_r)
  File "/home/RV/.local/lib/python2.7/site-packages/scipy/optimize/minpack.py", line 716, in curve_fit
    xdata = xdata.astype(float)
ValueError: setting an array element with a sequence."

any help to resolve this
thank you in advance


Mit Naik

unread,
Feb 11, 2021, 1:34:51 AM2/11/21
to CoFFEE code forum
Hi,

I'm not sure what's going wrong. 

What system are you trying to study? If it is bulk, you don't need to worry too much about the exact fitting of the Gaussian to your defect charge density. A rough fitting should be okay. The correction is not sensitive to the width of the Gaussian model charge. See Table 5.1 in the user guide: http://www.physics.iisc.ac.in/~mjain/software/coffee/UserGuide.pdf

Best,
Mit

Reply all
Reply to author
Forward
0 new messages