QuantumATK Forum

QuantumATK => Installation and License Questions => Topic started by: faxer92 on June 18, 2017, 03:12

Title: RuntimeError: To use interp='nn' (Natural Neighbor interpolation) in griddata,
Post by: faxer92 on June 18, 2017, 03:12
Dear Sir
When execute Prof. Blom's code "cb_plot.py" from
http://quantumwise.com/forum/index.php?topic=3376.0 (http://quantumwise.com/forum/index.php?topic=3376.0)
 I get an error:

File ".\build\lib\site-packages\matplotlib-1.5.0-py2.7-win-amd64.egg\matplotlib\mlab.py", line 3421, in griddata
RuntimeError: To use interp='nn' (Natural Neighbor interpolation) in griddata, natgrid must be installed. Either install it from http://github.com/matplotlib/natgrid or use interp='linear' instead.

how to I do to make it work?
Regards
Title: Re: RuntimeError: To use interp='nn' (Natural Neighbor interpolation) in griddata,
Post by: Anders Blom on June 18, 2017, 09:28
Well, the answer is given in the error message, but I have attached an updated version of the script. It's not an exact replica because it also plots the Brillouin zone, but that's probably what you want :)
Title: Re: RuntimeError: To use interp='nn' (Natural Neighbor interpolation) in griddata,
Post by: faxer92 on June 18, 2017, 12:20
Wonderful..!!!!  you really do me a big favor.Thank you very much (BTW, your reply is very efficient!!!)
Title: Re: RuntimeError: To use interp='nn' (Natural Neighbor interpolation) in griddata,
Post by: faxer92 on June 18, 2017, 18:12
Dear Sir
Would you please show me more examples of learning how to convert (kA,kB) to (kx,ky)? For example, to plot 2D surface (kz=0) in fig3.6 in http://www.iue.tuwien.ac.at/phd/dhar/node18.html (http://www.iue.tuwien.ac.at/phd/dhar/node18.html). Thank you very much.
Title: Re: RuntimeError: To use interp='nn' (Natural Neighbor interpolation) in griddata,
Post by: Jess Wellendorff on June 19, 2017, 12:53
This tutorial should provide an example: http://docs.quantumwise.com/tutorials/topological_insulator_bi2se3/topological_insulator_bi2se3.html#fermi-surface-and-spin-directions (http://docs.quantumwise.com/tutorials/topological_insulator_bi2se3/topological_insulator_bi2se3.html#fermi-surface-and-spin-directions)
Title: Re: RuntimeError: To use interp='nn' (Natural Neighbor interpolation) in griddata,
Post by: faxer92 on June 19, 2017, 15:47
You guys are really awesome!! that's what I'm looking for, this is fairly good enough to find effective mass difference in real space (even though BZ remains unknown to draw out) , thank you so much!!!
Title: Re: RuntimeError: To use interp='nn' (Natural Neighbor interpolation) in griddata,
Post by: Jess Wellendorff on June 19, 2017, 16:30
Thanks for the kind words!