DOWNLOADS

1X-Ray for Windows 5.02b - x-raytracing program for simulation of x-ray imaging with bent crystals.
[ Download | File format: .zip | Number of downloads: 2000+ ]

2Superlattice - Windows program for simulations of x-ray diffraction by superlattices and semiconductor structures.
[ Download | File format: .zip | File size: 665kb | Number of downloads: ]

3"New kind of Fourier Holography" (reconstruction algorithm of objects within rectangular slits from their Fraunhofer diffraction pattern).
see our publication in Opt.Express (2007)

Open Source in IDL Code:

;------------IDL CODE------------------------------------------------------
pro phase_ant
n1=1600 ;dimension of CCD in X direction
n2=1200 ;dimension of CCD in Y direction
temp=0.0D ;temporary variable
infile='C:/intensity.dat' ;input file with diffracted intensity
intensity=dblarr(n1,n2) ;intensity array
OPENR, iunit, infile, /GET_LUN ;open file
for j=0, (n2-1) do begin ;read file
for i=0, (n1-1) do begin
READF, FORMAT="(F21.14)", iunit, temp
intensity(i,j)=temp
endfor
endfor
FREE_LUN, iunit ;close file
live_image, alog(intensity) ;show intensity in logariphmic scale
ci=dcomplex(0.0D,2.0D*!DPI) ;imaging unit times 2Pi
k_xy=dcomplexarr(n1,n2) ;temporary array
k=MAX(intensity,J) ;maximum of intensity
PRINT, k ;print maximu
IX = J MOD (n1) ;X centre of intensity
IY = J/(n1) ;Y centre of intensity
PRINT, 'The maximum value of I is at location ('+ STRTRIM(IX, 1) $ + ', ' + STRTRIM(IY, 1) + ')' ;show information
PRINT, intensity(iX,iY) ;print centre coordinates
;--------------------------exact algorithm------------------
for i=0,(n1-1) do begin
for j=0,(n2-1) do begin
k_xy(i,j)=(dcomplex(1.0D,0.0D)-exp(ci*double(i-iX)/double(n1)))*(dcomplex(1.0D,0.0D)-exp(ci*double(j-iY)/double(n2)))*intensity(i,j)
endfor
endfor
imageSize=[n1,n2] ;image size
center = imageSize/2 ;centre of image
k_xy=fft(k_xy,/double,/inverse,/overwrite) ;reconstruction
phase_image=shift(atan(k_xy,/phase),center) ;phase of object
live_image, (phase_image) ;show phase image
new_image=abs(k_xy) ;amplitude of image
live_image, alog(shift(new_image,center)) ;show amplitude
;---------------extraction of the object-----------------------------
part_image=EXTRAC(new_image,0,1200-270,360,270)
live_image, alog(part_image)
imge=(EXTRAC(part_image,360-180,0,180,135))
live_image, (imge) ;show extraction
write_tiff, 'C:/abs_ant1.tif', FIX(255*imge/max(imge)) ;save the image of object
end
;-----------------------END OF THE CODE--------------------------------------
link to file of intensity: http://www.x-ray-soft.de/images/intensity.dat


4"Fresnel in-line Holography" (reconstruction algorithm of objects from their Fresnel diffraction pattern).
see for more details: search words "x-ray image reconstruction" in www.google.com

Open Source in IDL Code:

;------------IDL CODE------------------------------------------------------
function shows, id,g1,title,wsc, A,B
out = 1
g=CONGRID(g1, 600, 600)
SZ = SIZE(g) & NS = N_ELEMENTS(SZ)
NDIM = SZ(0)
DIMS = SZ(1:NDIM)
XDIM = DIMS(0)
YDIM = DIMS(1)
DEVICE, GET_SCREEN_SIZE=SCREEN
XSIZE = XDIM*WSC
YSIZE = YDIM*WSC
WINDOW, id, TIT = title, XS = XSIZE, YS = YSIZE, XPos=A, YPos=B
TMP = REFORM(g) & SZ=SIZE(TMP)
NX = SZ(1)
NY = SZ(2)
TV, REBIN(BYTSCL(TMP), NX*WSC, NY*WSC, /SAMPLE)
return,out
end


pro fresnel_inverse
;-----------EXPERIMENTAL DATA----------------------------
init01=double(read_tiff('c:\sample.tif'))
;--------------------------------------------------------
S=SIZE(init01)
nX0=S(1)
nY0=S(2)
nX=nX0
nY=nY0
ci=dcomplex(0.0D,1.0D)
init1=dblarr(nX,nY)
init=dblarr(nX,nY)
init1=CONGRID(init01,nX,nY)
init(*,*)=init1(*,*)
for i=0,(nX-1) do begin
for k=0,(nY-1) do begin
if(init(i,k) LT 0.0D) then init(i,k)=0.0D
endfor
endfor
center=[FIX(nX/2),FIX(nY/2)]
;-------------INPUT DATA----------------------------------
lambda=632.8D-09 ;---------wavelength
pix_size=3.2D-06 ;---------pixel size of CCD---
CK1=pix_size*nX0 ;---------dx-size of hole-----
CK2=pix_size*nY0 ;---------dy-size of hole-----
Z=300.0D-03 ;---------distance to detector
Kj=2.0D*!DPI/lambda ;---------wavenumber----------
k_XY=dcomplexarr(nX,nY)
FACTOR=dcomplex(0.0,0.0)
;-----------set of points in the hole----------------
for i=0,(nX-1) do begin
for j=0,(nY-1) do begin
k_X=(i-nX/2.0D)/CK1
k_Y=(j-nY/2.0D)/CK2
FACTOR=ci*2.0D*!DPI*SQRT((1.0D/(lambda^2))-(k_X)^2-(k_Y)^2)
k_XY(i,j)=exp(Z*FACTOR)
endfor
endfor
new_image_F=dcomplexarr(nX,nY)
new_image=dcomplexarr(nX,nY)
new_image_F=shift(FFT(init,/double),center)
new_image=FFT(new_image_F*k_XY,/double,/inverse)
;--------------------------------------------------------------------
phase_i=(atan(new_image,/phase))
phase=dcomplexarr(nX,nY)
phase_image=dblarr(nX,nY)
phase_image(*,*)=0.0D
phase_intensity=dcomplexarr(nX,nY)
PR=dcomplexarr(nX,nY)
kX=1.0D/CK1
kY=1.0D/CK2
;------Phase Unwrapping---------------------------------
phase_x=shift(fft(phase_i-shift(phase_i,-1,0),/double),center)/pix_size
phase_y=shift(fft(phase_i-shift(phase_i,0,-1),/double),center)/pix_size
for i=0,(nX-1) do begin
for k=0,(nY-1) do begin
if (((i-nX/2)^2+(k-nY/2)^2) GT 0.0) then phase(i,k)=(phase_x(i,k)*(i-0.5D*nX)*kX+phase_y(i,k)*(k-0.5D*nY)*kY)/(((i-0.5D*nX)*kX)^2+((k-0.5D*nY)*kY)^2) else phase(i,k)=dcomplex(0.0D,0.0D)
endfor
endfor
phase_image=imaginary(fft(phase,/double,/inverse))/2/!DPI
for i=0,(nX-1) do begin
for k=0,(nY-1) do begin
if (phase_image(i,k) LT 0.0) then phase_image(i,k)=0.0D
endfor
endfor
;--------------------------------------------------------
k=shows(3,EXTRAC(abs(new_image),0,0,nY,nY),'Gabor in-line Holography',1,620,0)
k=shows(4,EXTRAC(phase_image,0,0,nY,nY),'Reconstruction PHASE',1,0,0)
new_image=abs(new_image)
live_image, (phase_image)
live_image, abs(new_image)
write_tiff, 'c:\amplitude_reconstruction.tif', FIX(255*abs(new_image)/max(abs(new_image)))
write_tiff, 'c:\phase_reconstruction.tif', FIX(255*phase_image/max(phase_image))
end
;------------END OF CODE---------------------------------------------------------------------
link to file of intensity: http://www.x-ray-soft.de/images/sample.tif






email: ceo@x-ray-soft.de
hits:
home | people | science | highlights | publications | downloads
©2004-2006 Dr. Podorov. Privacy Policy. All rights reserved.
Site by Elizaveta Dilanyan. Ivan Designer