spectral anlysis of a pattern

9 views (last 30 days)
doron bartov
doron bartov on 21 Aug 2012
hi,
i am trying to write a simulation of plane waves propagation.
the first issue i am having a hard time figuring out is how to deal with the wavelenght, i am using fourier transform of a pattern in order to decompose the pattern to exponential terms and then propagating these waves, but my fourier transform does not have the wavelenght in it, so i am confused.
obviously a difraction from the same grating with a different wavelengh would result in a different spectrum.
any help?
  2 Comments
Image Analyst
Image Analyst on 21 Aug 2012
Can you supply the equation you're using? Is it simply the grating equation: http://en.wikipedia.org/wiki/Grating_equation#Theory_of_operation
doron bartov
doron bartov on 22 Aug 2012
btw the my code is :
function [] = spectMask1dNew(maskType, waveVec)
%single slit diffraction N= 2^10 %number of sampling points . x= 0.00001 % length of aperture in meters. W=1*10^-6 %width of the slit im meters. I=1000 % intensity of light in watts lambda= 500*10^-9 % wavelenght of incident light. dx=x/N; %interval size in x space. dq=1/x % interval in k space. z=1; %distance of plane in z coordinate apertureVec=zeros(1,N); dw= round(W/dx/2); apertureVec(N/2-dw:N/2+dw)=sqrt(I)/(dw*2); %energy of every bin in the slit. xf=1/N*fftshift(fft(apertureVec));% scaled and shifted fft of aperture. imageX=linspace(-x/2,x/2,N); %image X coordinate kVec=linspace(-pi/x,pi/x,N);
for ii=1:N; alpha= kVec(ii)/(pi/x); fieldZ(:,ii)=(xf(ii).*exp(1i*2*pi*alpha*imageX/lambda)*exp(i*2*pi/lambda*sqrt(1-alpha^2)*z));
end fieldMat=sum(fieldZ,2);

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!