From d8a43ad15330c4d8ffb9f5f42a59a69edb75f067 Mon Sep 17 00:00:00 2001 From: Karthik Chandrashekara Date: Wed, 14 Jul 2021 20:11:16 +0200 Subject: [PATCH] Cosmetic changes, added argument to allow setting of lower velocity limit. --- .../+Plotting/plotPhaseSpaceWithAccelerationField.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MOT Capture Process Simulation/+Plotting/plotPhaseSpaceWithAccelerationField.m b/MOT Capture Process Simulation/+Plotting/plotPhaseSpaceWithAccelerationField.m index c68faae..71f915e 100644 --- a/MOT Capture Process Simulation/+Plotting/plotPhaseSpaceWithAccelerationField.m +++ b/MOT Capture Process Simulation/+Plotting/plotPhaseSpaceWithAccelerationField.m @@ -1,4 +1,4 @@ -function plotPhaseSpaceWithAccelerationField(obj, MaximumVelocity, NumberOfBins, IncidentAtomDirection, IncidentAtomPosition) +function plotPhaseSpaceWithAccelerationField(obj, MinimumVelocity, MaximumVelocity, NumberOfBins, IncidentAtomDirection, IncidentAtomPosition) f_h = Helper.getFigureByTag('Phase Space Plot'); set(groot,'CurrentFigure',f_h); @@ -49,21 +49,21 @@ function plotPhaseSpaceWithAccelerationField(obj, MaximumVelocity, NumberOfBins, %------------------------------------------------------------------------- - Y = linspace(0,MaximumVelocity,N); - ParticleDynamicalQuantities = zeros(length(Y),int64(T/tau),6); + Y = linspace(MinimumVelocity, MaximumVelocity,N); + DynamicalQuantities = zeros(length(Y),int64(T/tau),6); for i=1:length(Y) x =-L/2; vx = Y(i)*cos(Theta); vz = Y(i)*sin(Theta); r = [x,0,z]; v = [vx,0,vz]; - ParticleDynamicalQuantities(i,:,:) = obj.solver(r, v); + DynamicalQuantities(i,:,:) = obj.solver(r, v); end hold on for i=1:length(Y) - plot(ParticleDynamicalQuantities(i,:,1),ParticleDynamicalQuantities(i,:,4),'w','linewidth',1.3) + plot(DynamicalQuantities(i,:,1),DynamicalQuantities(i,:,4),'w','linewidth',1.3) end hold off