From the file Tutorial_Transmission_Coefficients.pdf downloading from ATK, I learn to how to get
the k-point resolved transmission coefficients.
As shown in the following script, I can get the file FeMgO_ap_maj.png for the k-point resolved transmission coefficients.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from ATK.TwoProbe import *
import numpy
#------------------------------------
nc_filename = 'femgofe_antipara.nc'
Npoints = 25
energy = 0.*eV
#------------------------------------
Kxy = numpy.linspace(-0.5,0.5,Npoints)
K = []
for kx in Kxy:
for ky in Kxy:
K.append([kx,ky])
scf = restoreSelfConsistentCalculation(nc_filename)
# Spin-dependent version
trans_coeff = calculateTransmissionCoefficients(scf,energy,(K,Spin.Up))
# No spin
### trans_coeff = calculateTransmissionCoefficients(scf,energy, K)
T = trans_coeff.reshape(Npoints,Npoints)
def plotTEk(Kxy,T,title,filename):
import pylab as P
fig = P.figure()
P.xlabel('kx')
P.ylabel('ky')
P.contourf(Kxy,Kxy,T,40,cmap=P.cm.Spectral)
P.colorbar()
P.axis([-.5,.5,-.5,.5])
P.yticks(numpy.arange(-0.5,0.51,0.1))
P.xticks(numpy.arange(-0.5,0.51,0.1))
P.title(title)
P.savefig(filename,dpi=100)
title = 'FeMgO, anti-parallel config, majority spin'
# Let us plot log(T) instead of T
plotTEk(Kxy,numpy.log(abs(T)),title,'FeMgO_ap_maj.png')
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now I would like to get the data file, and then I can plot the k-point resolved transmission coefficients using my own plot tool, like gnuplot.
How can I change the above script to save the k-point resolved transmission coefficients as one isolated file?