Author Topic: RuntimeError: To use interp='nn' (Natural Neighbor interpolation) in griddata,  (Read 5317 times)

0 Members and 1 Guest are viewing this topic.

Offline faxer92

  • Heavy QuantumATK user
  • ***
  • Posts: 27
  • Country: tw
  • Reputation: 0
    • View Profile
Dear Sir
When execute Prof. Blom's code "cb_plot.py" from
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
« Last Edit: June 18, 2017, 03:17 by faxer92 »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5383
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
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 :)

Offline faxer92

  • Heavy QuantumATK user
  • ***
  • Posts: 27
  • Country: tw
  • Reputation: 0
    • View Profile
Wonderful..!!!!  you really do me a big favor.Thank you very much (BTW, your reply is very efficient!!!)

Offline faxer92

  • Heavy QuantumATK user
  • ***
  • Posts: 27
  • Country: tw
  • Reputation: 0
    • View Profile
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. Thank you very much.
« Last Edit: June 18, 2017, 18:16 by faxer92 »

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile

Offline faxer92

  • Heavy QuantumATK user
  • ***
  • Posts: 27
  • Country: tw
  • Reputation: 0
    • View Profile
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!!!

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile
Thanks for the kind words!