From 6cde617bb40b6ab977b12573be8c6653c601be59 Mon Sep 17 00:00:00 2001 From: Karthik Chandrashekara Date: Wed, 14 Jul 2021 20:05:40 +0200 Subject: [PATCH] Fixed the Saturation parameter calculation was not indexing over the local saturation intensity array. --- .../@MOTSimulator/calculateTotalAcceleration.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MOT Capture Process Simulation/@MOTSimulator/calculateTotalAcceleration.m b/MOT Capture Process Simulation/@MOTSimulator/calculateTotalAcceleration.m index fc620c5..03d343b 100644 --- a/MOT Capture Process Simulation/@MOTSimulator/calculateTotalAcceleration.m +++ b/MOT Capture Process Simulation/@MOTSimulator/calculateTotalAcceleration.m @@ -43,11 +43,11 @@ function ret = calculateTotalAcceleration(this, PositionVector, VelocityVector) SaturationParameter = [0,0,0,0,0,0,0,0]; for i = 1:2 - SaturationParameter(2*i-1) = CoolingBeamLocalSaturationIntensity(1) /(1 + 4 * (Delta_Cooling(2*i-1)/this.CoolingBeamLinewidth)^2); - SaturationParameter(2*i) = CoolingBeamLocalSaturationIntensity(2) /(1 + 4 * (Delta_Cooling(2*i) /this.CoolingBeamLinewidth)^2); + SaturationParameter(2*i-1) = CoolingBeamLocalSaturationIntensity(i) /(1 + 4 * (Delta_Cooling(2*i-1)/this.CoolingBeamLinewidth)^2); + SaturationParameter(2*i) = CoolingBeamLocalSaturationIntensity(i) /(1 + 4 * (Delta_Cooling(2*i) /this.CoolingBeamLinewidth)^2); if this.Sideband - SaturationParameter(2*i-1+4) = SidebandLocalSaturationIntensity(1) /(1 + 4 * (Delta_Sideband(2*i-1)/this.CoolingBeamLinewidth)^2); - SaturationParameter(2*i+4) = SidebandLocalSaturationIntensity(2) /(1 + 4 * (Delta_Sideband(2*i)/this.CoolingBeamLinewidth)^2); + SaturationParameter(2*i-1+4) = SidebandLocalSaturationIntensity(i) /(1 + 4 * (Delta_Sideband(2*i-1)/this.CoolingBeamLinewidth)^2); + SaturationParameter(2*i+4) = SidebandLocalSaturationIntensity(i) /(1 + 4 * (Delta_Sideband(2*i)/this.CoolingBeamLinewidth)^2); end end