real*4 lambda,dist,theta,pix,yfilm,x,d
lambda=1.08
write(6,*)'Enter IP Distance (mm):'
read(5,*) dist
write(6,*)'Enter beam center coord (in pixels):'
write(6,*)'600 600 or 1000 1000 or 950 950'
read(5,*)xc,yc
write(6,*)'Enter pixel size (mm):'
write(6,*)'0.15 for MAR, .105 for RAXIS'
read(5,*)pix
write(6,*)'Enter wavelength:'
write(6,*)'1.08 for MAR,1.5418 for RAXIS'
read(5,*)lambda
10 write(6,*)'Enter spot coord (in pixels):'
read(5,*,end=20) xf,yf
xf=(xf-xc)
yf=(yf-yc)
yfilm=pix*sqrt(xf*xf+yf*yf)
theta=atan(yfilm/dist)/2
d=lambda/(2*sin(theta))
write (6,*)d
goto 10
20 continue
end