from gpaw.transport.analysor import Transport_Plotter import numpy as np from pylab import * import sys plotter = Transport_Plotter() plotter.plot_setup() if len(sys.argv) <= 2: if len(sys.argv[1]) <= 2: nt = plotter.get_info('nty', int(sys.argv[1]), 0) else: tmp = sys.argv[1].split('-') sam = int(tmp[0]) ref = int(tmp[1]) nt = plotter.get_info('nty', sam, 0) - plotter.get_info('nty', ref, 0) else: nt = plotter.get_info('nty', int(sys.argv[1]), int(sys.argv[2])) matshow((nt[0])) colorbar() xlabel('Transport Direction') ylabel('Pseudo Density') show()
from gpaw.transport.analysor import Transport_Plotter import numpy as np from pylab import * import sys if "*" in sys.argv[1]: fd = 0 nbias = int(sys.argv[1].split("*")[0]) else: fd = 1 nbias = int(sys.argv[1]) plotter = Transport_Plotter(fd) dense_level = 1 plotter.plot_setup() if len(sys.argv) > 1: bias, current = plotter.iv(nbias) else: bias, current = plotter.iv() bias = np.abs(bias) plot(bias, current, "r-o") if dense_level > 1: from scipy import interpolate tck = interpolate.splrep(bias, current, s=0) numb = len(bias) newbias = np.linspace(bias[0], bias[-1], numb * (dense_level)) newcurrent = interpolate.splev(newbias, tck, der=0) bias = newbias