77 lines
2.4 KiB
Mathematica
77 lines
2.4 KiB
Mathematica
|
set(0,'defaulttextInterpreter','latex')
|
||
|
set(groot, 'defaultAxesTickLabelInterpreter','latex'); set(groot, 'defaultLegendInterpreter','latex');
|
||
|
|
||
|
RunIdx = 1;
|
||
|
|
||
|
FileDir = dir(sprintf('./Data/Run_%03i/TimeEvolution/*.mat',RunIdx));
|
||
|
NumFiles = numel(FileDir);
|
||
|
QuenchSettings = load(sprintf('./Data/Run_%03i/QuenchSettings',RunIdx),'Quench','Params','Transf','VDk','V');
|
||
|
Transf = QuenchSettings.Transf; Params = QuenchSettings.Params;
|
||
|
x = Transf.x; y = Transf.y; z = Transf.z;
|
||
|
dx = x(2)-x(1); dy = y(2)-y(1); dz = z(2)-z(1);
|
||
|
|
||
|
mkdir(sprintf('./Data/Run_%03i/Figures',RunIdx))
|
||
|
outputVideo = VideoWriter(fullfile('./Data/Movie.avi'));
|
||
|
outputVideo.FrameRate = 10;
|
||
|
open(outputVideo)
|
||
|
|
||
|
figure(1);
|
||
|
x0 = 800;
|
||
|
y0 = 200;
|
||
|
width = 800;
|
||
|
height = 600;
|
||
|
set(gcf,'position',[x0,y0,width,height])
|
||
|
|
||
|
EVecTemp = [];
|
||
|
|
||
|
for ii = 2:(NumFiles-1)
|
||
|
load(sprintf('./Data/Run_%03i/TimeEvolution/psi_%i.mat',RunIdx,ii),'psi','muchem','T','Observ','t_idx');
|
||
|
|
||
|
%Plotting
|
||
|
subplot(2,3,1)
|
||
|
n = abs(psi).^2;
|
||
|
nxz = squeeze(trapz(n*dy,2));
|
||
|
nyz = squeeze(trapz(n*dx,1));
|
||
|
nxy = squeeze(trapz(n*dz,3));
|
||
|
|
||
|
plotxz = pcolor(x,z,nxz'); shading interp
|
||
|
set(plotxz, 'EdgeColor', 'none');
|
||
|
xlabel('$x$ [$\mu$m]'); ylabel('$z$ [$\mu$m]');
|
||
|
|
||
|
subplot(2,3,2)
|
||
|
plotyz = pcolor(y,z,nyz'); shading interp
|
||
|
set(plotyz, 'EdgeColor', 'none');
|
||
|
xlabel('$y$ [$\mu$m]'); ylabel('$z$ [$\mu$m]');
|
||
|
|
||
|
subplot(2,3,3)
|
||
|
plotxy = pcolor(x,y,nxy'); shading interp
|
||
|
set(plotxy, 'EdgeColor', 'none');
|
||
|
xlabel('$x$ [$\mu$m]'); ylabel('$y$ [$\mu$m]');
|
||
|
|
||
|
subplot(2,3,4)
|
||
|
plot(Observ.tVecPlot*1000/Params.w0,Observ.NormVec,'-b')
|
||
|
ylabel('Normalization'); xlabel('$t$ [$m$s]');
|
||
|
|
||
|
subplot(2,3,5)
|
||
|
plot(Observ.tVecPlot*1000/Params.w0,1-2*Observ.PCVec/pi,'-b')
|
||
|
ylabel('Coherence'); xlabel('$t$ [$m$s]');
|
||
|
ylim([0,1])
|
||
|
|
||
|
subplot(2,3,6)
|
||
|
plot(Observ.tVecPlot*1000/Params.w0,Observ.EVec,'-b')
|
||
|
ylabel('E'); xlabel('$t$ [$m$s]');
|
||
|
|
||
|
tVal = Observ.tVecPlot(end)*1000/Params.w0;
|
||
|
sgtitle(sprintf('$\\mu =%.3f \\hbar\\omega_0$, $T=%.1f$nK, $t=%.1f$ms',muchem,T,tVal))
|
||
|
|
||
|
drawnow
|
||
|
saveas(gcf,sprintf('./Data/Run_%03i/Figures/Image_%i.jpg',RunIdx,ii))
|
||
|
img = imread(sprintf('./Data/Run_%03i/Figures/Image_%i.jpg',RunIdx,ii));
|
||
|
writeVideo(outputVideo,img)
|
||
|
% hold off;
|
||
|
clf
|
||
|
end
|
||
|
|
||
|
close(outputVideo)
|
||
|
close(figure(1))
|
||
|
delete(sprintf('./Data/Run_%03i/Figures/*.jpg',RunIdx)) % deleting images after movie is made
|