Added a switch to change between 2D and 3D MOT cases to allow for this code to be expanded and generalized in the future.

This commit is contained in:
Karthik 2021-07-11 06:36:49 +02:00
parent e17015d181
commit 47a93001c8

View File

@ -1,7 +1,12 @@
function ret = initialPositionSampling(this)
n = this.NumberOfAtoms;
phi = 2 * pi * rand(n,1);
rho = this.Beta * 0.5 * this.NozzleLength * sqrt(rand(n,1));
ret = [-this.OvenDistance * ones(n,1), rho.*cos(phi), rho.*sin(phi)];
switch this.SimulationMode
case "2D"
n = this.NumberOfAtoms;
phi = 2 * pi * rand(n,1);
rho = this.Beta * 0.5 * this.NozzleLength * sqrt(rand(n,1));
ret = [-this.OvenDistance * ones(n,1), rho.*cos(phi), rho.*sin(phi)];
case "3D"
% Development In progress
end
end