I have a simple gaussian line source between 60 and 300 THz launched
into vacuum.  I save the field data in an X slice at each time step,
then import the data for a point of the slice into matlab.

I then plot the FFT of the data, and find that the center frequency is 
not 180 THz, but something a bit higher (188 THz).

I'm pretty certain that the matlab script is correct.  Is there 
something in meep which could be causing the frequency shift?

Kind Regards,
Matt




complete meep script: http://pastebin.com/f40f6a200


matlab fft script:

file = hdf5info('pulsetest2-refl-slice.noscat.h5');
refl_noscat  = hdf5read(file.GroupHierarchy.Datasets);
file = hdf5info('pulsetest2-trans-slice.noscat.h5'); 
trans_noscat = hdf5read(file.GroupHierarchy.Datasets);

a = refl_noscat(:,2);
L = length(a);
c = 299792458;
dt = (1/80)*1e-6/c;

NFFT = 2^nextpow2(L); % Next power of 2 from length of data
A = fft(a,NFFT)/L;
f = (1/dt)/2*linspace(0,1,NFFT/2);

y=plot(f,2*abs(A(1:NFFT/2)));
grid on;
line([180e12 180e12],[0 0.05]);  % line representing center freq
axis([0 400e12 0 0.05]);



_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to