ARPES: E(deg) to E(k) with bias voltage
maniraj
Now I would like to change the code to accommodate the biasing effect. The new equation for E(deg) to E(k||) with biasing voltage will look like in the attached file. Although theta is function of E_kin but it is similar to common K|| conversion equation.
I have tried to write as follows: mainly my aim is to do all this things in single macro. Please let me know does it possible.
Here is the code:
Function AngleToK_withbias(inwave) /// needs angle (y-axis) vs energy (x-axis)
Wave inwave
String newname = NameofWave(inwave)+"_kwb"
Duplicate/O inwave, $newname
Wave outwave = $newname
Variable rows,columns,xdelta,xoffset,ydelta,yoffset // inwave parameters
rows = DimSize(inwave,0)
columns = DimSize(inwave,1)
xdelta = DimDelta(inwave,0)
xoffset = DimOffset(inwave,0)
ydelta = DimDelta(inwave,1)
yoffset = DimOffset(inwave,1)
Variable kmin,kmax,kdelta,Emax,Emin
Emax = xoffset + xdelta*(rows-1)
Variable theta_f,theta_i
Variable U=5
Variable e= 1.602176565*10^-19
theta_i=pi/180*(yoffset)
Emin=xoffset
theta_f=theta_i+atan((e*U*(1-sin(theta_i)/theta_i))/(Emin-(e*U*(1-sin(theta_i)/theta_i))))^0.5
kmin = 0.512*sqrt(Emax)*sin(theta_f) // calculate the k boundaries (i.e., k at highest Ekin)
theta_i=pi/180*(yoffset+(columns-1)*ydelta)
theta_f=theta_i+atan((e*U*(1-sin(theta_i)/theta_i))/(Emin-(e*U*(1-sin(theta_i)/theta_i))))^0.5
kmax = 0.512*sqrt(Emax)*sin(theta_f)
SetScale/I y kmin,kmax,"Ang^-1", outwave // scale the y axis
outwave = interp2D(inwave, x, (180/pi)*asin(y/ (0.512*sqrt(x)))) // recalculate to k
outwave = (NumType(outwave)==2) ? 0 : outwave // replace NaNs (optional)
End
If you have any idea pls let me know.
AngleFormula
function. Here's the code (I also attach the procedure file):Wave inwave
Variable U, tilt // U in eV, tilt in deg
String newname = NameofWave(inwave)+"_b"
Duplicate/O inwave, $newname
Wave outwave = $newname
Variable rows,columns,xdelta,xoffset,ydelta,yoffset // inwave parameters
rows = DimSize(inwave,0)
columns = DimSize(inwave,1)
xoffset = DimOffset(inwave,0)
ydelta = DimDelta(inwave,1)
yoffset = DimOffset(inwave,1)
SetScale/I y yoffset+AngleFormula(U,xoffset,tilt), yoffset+ydelta*(columns-1)+AngleFormula(U,xoffset,tilt), outwave // scale the y axis to the extreme vaules
outwave = interp2D(inwave, x, y - AngleFormula(U,x,tilt)) // recalculate to corrected angles
outwave = (NumType(outwave)==2) ? 0 : outwave // replace NaNs (optional)
End
Function AngleFormula(U,Ekin,tilt) // output: correction in deg
Variable U, Ekin, tilt // U in eV, Ekin in eV, tilt in deg
Variable radT = tilt*Pi/180
Variable inbrackets=1-sqrt(1-radT^2)/2-asin(radT)/(2*radT)
return asin(sqrt(U/Ekin*inbrackets))/(Pi/180)
End
June 2, 2014 at 09:23 pm - Permalink
June 3, 2014 at 04:03 am - Permalink
Actually I discovered a little mistake in the code. The lower limit of the scaling was wrong so the data gets cut off. Also, I though it would be useful to include the case of when the tilt angle gets negative (i.e., when you have tilted the sample in the other direction but don't want to invert the data). U should be positive (although you can insert a negative value since I use the absolute).
Anyway, here's the new code:
Wave inwave
Variable U, tilt // U in eV, tilt in deg
String newname = NameofWave(inwave)+"_b"
Duplicate/O inwave, $newname
Wave outwave = $newname
Variable rows,columns,xdelta,xoffset,ydelta,yoffset // inwave parameters
rows = DimSize(inwave,0)
columns = DimSize(inwave,1)
xdelta = DimDelta(inwave,0)
xoffset = DimOffset(inwave,0)
ydelta = DimDelta(inwave,1)
yoffset = DimOffset(inwave,1)
Variable MinE = xoffset + (tilt<0)*xdelta*(rows-1), MaxE = xoffset + (tilt>=0)*xdelta*(rows-1)
SetScale/I y yoffset+sign(tilt)*AngleFormula(U,MaxE,tilt), yoffset+ydelta*(columns-1)+sign(tilt)*AngleFormula(U,MinE,tilt), outwave // scale the y axis to the extreme vaules
outwave = interp2D(inwave, x, y - sign(tilt)*AngleFormula(U,x,tilt)) // recalculate to corrected angles
outwave = (NumType(outwave)==2) ? 0 : outwave // replace NaNs (optional)
End
Function AngleFormula(U,Ekin,tilt) // output: correction in deg
Variable U, Ekin, tilt // U in eV, Ekin in eV, tilt in deg
Variable radT = tilt*Pi/180
Variable inbrackets=1-sqrt(1-radT^2)/2-asin(radT)/(2*radT)
return asin(sqrt(abs(U)/Ekin*inbrackets))/(Pi/180)
End
June 3, 2014 at 04:35 am - Permalink
June 4, 2014 at 05:31 am - Permalink
June 4, 2014 at 06:06 am - Permalink
So, in that case what ever angle we have in the image in y-axis, that will be the value one should feed in to the equation as theta_m. But, when data is taken with sample is rotated then tilt is must to have correction. This is also necessary just because the y-scale is not corrected. So, when one stitch the image taken at different tilt angle and get single image with proper scaling, then angle value (y-scale) is just enough and that is the value should be feed to the equation as theta_m.
June 5, 2014 at 09:22 am - Permalink
June 5, 2014 at 06:44 pm - Permalink