Compare commits
4 Commits
7a903bc6de
...
5f068db1c1
Author | SHA1 | Date | |
---|---|---|---|
5f068db1c1 | |||
090b08840c | |||
f0a35e5f0d | |||
bd97ffc5d8 |
48
+Scripts/optimizingForSidebandEnhancement.m
Normal file
48
+Scripts/optimizingForSidebandEnhancement.m
Normal file
@ -0,0 +1,48 @@
|
||||
OptionsStruct = struct;
|
||||
OptionsStruct.ErrorEstimationMethod = 'bootstrap'; % 'jackknife' | 'bootstrap'
|
||||
OptionsStruct.NumberOfAtoms = 5000;
|
||||
OptionsStruct.TimeStep = 50e-06; % in s
|
||||
OptionsStruct.SimulationTime = 4e-03; % in s
|
||||
OptionsStruct.SpontaneousEmission = true;
|
||||
OptionsStruct.SidebandBeam = true;
|
||||
OptionsStruct.PushBeam = true;
|
||||
OptionsStruct.Gravity = true;
|
||||
OptionsStruct.BackgroundCollision = true;
|
||||
OptionsStruct.SaveData = true;
|
||||
% OptionsStruct.SaveDirectory = '';
|
||||
options = Helper.convertstruct2cell(OptionsStruct);
|
||||
clear OptionsStruct
|
||||
|
||||
Oven = Simulator.Oven(options{:});
|
||||
MOT2D = Simulator.TwoDimensionalMOT(options{:});
|
||||
|
||||
%%
|
||||
MOT2D.NumberOfAtoms = 5000;
|
||||
MOT2D.TotalPower = 0.4;
|
||||
MOT2D.SidebandBeam = true;
|
||||
NumberOfPointsForFirstParam = 10; %iterations of the simulation
|
||||
NumberOfPointsForSecondParam = 10;
|
||||
DetuningArray = linspace(-0.5, -5.0, NumberOfPointsForFirstParam) * Helper.PhysicsConstants.BlueLinewidth;
|
||||
PowerArray = linspace(0.1, 1.0, NumberOfPointsForSecondParam) * MOT2D.TotalPower;
|
||||
|
||||
tStart = tic;
|
||||
[LoadingRateArray, ~, ~] = Scripts.scanForSidebandEnhancement(Oven, MOT2D, 'Blue', 'BlueSideband', DetuningArray, PowerArray);
|
||||
tEnd = toc(tStart);
|
||||
fprintf('Total Computational Time: %0.1f seconds. \n', tEnd);
|
||||
|
||||
% - Plot results
|
||||
|
||||
OptionsStruct = struct;
|
||||
OptionsStruct.RescalingFactorForFirstParameter = (Helper.PhysicsConstants.BlueLinewidth)^-1;
|
||||
OptionsStruct.XLabelString = 'Sideband Beam Detuning (\Delta/\Gamma)';
|
||||
OptionsStruct.RescalingFactorForSecondParameter = 1000;
|
||||
OptionsStruct.YLabelString = 'Sideband Beam Power (mW)';
|
||||
OptionsStruct.RescalingFactorForQuantityOfInterest = 1e-9;
|
||||
OptionsStruct.ZLabelString = 'Loading rate (x 10^{9} atoms/s)';
|
||||
OptionsStruct.TitleString = sprintf('Magnetic Gradient = %.0f (G/cm)', MOT2D.MagneticGradient * 100);
|
||||
|
||||
options = Helper.convertstruct2cell(OptionsStruct);
|
||||
|
||||
Plotter.plotResultForTwoParameterScan(DetuningArray, PowerArray, LoadingRateArray, options{:})
|
||||
|
||||
clear OptionsStruct
|
33
+Scripts/scanForSidebandEnhancement.m
Normal file
33
+Scripts/scanForSidebandEnhancement.m
Normal file
@ -0,0 +1,33 @@
|
||||
function [LoadingRateArray, StandardErrorArray, ConfidenceIntervalArray] = scanForSidebandEnhancement(ovenObj, MOTobj, CBBeamName, SBBeamName, SBDetuningArray, SBPowerArray)
|
||||
|
||||
Beams = MOTobj.Beams;
|
||||
CoolingBeam = Beams{cellfun(@(x) strcmpi(x.Alias, CBBeamName), Beams)};
|
||||
SidebandBeam = Beams{cellfun(@(x) strcmpi(x.Alias, SBBeamName), Beams)};
|
||||
NumberOfPointsForFirstParam = length(SBDetuningArray);
|
||||
NumberOfPointsForSecondParam = length(SBPowerArray);
|
||||
LoadingRateArray = zeros(NumberOfPointsForFirstParam, NumberOfPointsForSecondParam);
|
||||
StandardErrorArray = zeros(NumberOfPointsForFirstParam, NumberOfPointsForSecondParam);
|
||||
ConfidenceIntervalArray = zeros(NumberOfPointsForFirstParam, NumberOfPointsForSecondParam, 2);
|
||||
|
||||
for i=1:NumberOfPointsForFirstParam
|
||||
eval(sprintf('SidebandBeam.%s = %d;', 'Detuning', SBDetuningArray(i)));
|
||||
for j=1:NumberOfPointsForSecondParam
|
||||
eval(sprintf('SidebandBeam.%s = %d;', 'Power', SBPowerArray(j)));
|
||||
eval(sprintf('CoolingBeam.%s = %d;', 'Power', MOTobj.TotalPower - SBPowerArray(j)));
|
||||
[LoadingRateArray(i,j), StandardErrorArray(i,j), ConfidenceIntervalArray(i,j,:)] = MOTobj.runSimulation(ovenObj);
|
||||
end
|
||||
end
|
||||
|
||||
if MOTobj.DoSave
|
||||
LoadingRate = struct;
|
||||
LoadingRate.Values = LoadingRateArray;
|
||||
LoadingRate.Errors = StandardErrorArray;
|
||||
LoadingRate.CI = ConfidenceIntervalArray;
|
||||
MOTobj.Results = LoadingRate;
|
||||
SaveFolder = [MOTobj.SaveDirectory filesep 'Results'];
|
||||
Filename = ['TwoParameterScan_' datestr(now,'yyyymmdd_HHMM')];
|
||||
eval([sprintf('%s_Object', Filename) ' = MOTobj;']);
|
||||
mkdir(SaveFolder);
|
||||
save([SaveFolder filesep Filename], sprintf('%s_Object', Filename));
|
||||
end
|
||||
end
|
@ -5,8 +5,8 @@ classdef Beams < handle & matlab.mixin.Copyable
|
||||
BlueBeamDefault = struct('Alias', 'Blue', ...
|
||||
'Power', 400e-3, ...
|
||||
'Detuning', -1.39*Helper.PhysicsConstants.BlueLinewidth, ...
|
||||
'Radius', 16.67e-3, ...
|
||||
'Waist', 15e-3, ...
|
||||
'Radius', 35e-3, ...
|
||||
'Waist', 16.67e-3, ...
|
||||
'WaveNumber',2*pi/Helper.PhysicsConstants.BlueWavelength, ...
|
||||
'Linewidth', Helper.PhysicsConstants.BlueLinewidth, ...
|
||||
'SaturationIntensity', 0.1 * (2 * pi^2 / 3) * ...
|
||||
@ -17,8 +17,8 @@ classdef Beams < handle & matlab.mixin.Copyable
|
||||
BlueSidebandBeamDefault = struct('Alias', 'BlueSideband', ...
|
||||
'Power', 200e-3, ...
|
||||
'Detuning', -3*Helper.PhysicsConstants.BlueLinewidth, ...
|
||||
'Radius', 16.67e-3, ...
|
||||
'Waist', 10e-3, ...
|
||||
'Radius', 35e-3, ...
|
||||
'Waist', 16.67e-3, ...
|
||||
'WaveNumber',2*pi/Helper.PhysicsConstants.BlueWavelength, ...
|
||||
'Linewidth', Helper.PhysicsConstants.BlueLinewidth, ...
|
||||
'SaturationIntensity', 0.1 * (2 * pi^2 / 3) * ...
|
||||
|
@ -1,11 +1,12 @@
|
||||
function [LoadingRate, StandardError, ConfidenceInterval] = runSimulation(this, ovenObj)
|
||||
|
||||
if this.NumberOfAtoms ~= ovenObj.NumberOfAtoms
|
||||
ovenObj.NumberOfAtoms = this.NumberOfAtoms;
|
||||
end
|
||||
%% - Sampling for initial positions and velocities
|
||||
% - sampling the position distribution
|
||||
Positions = ovenObj.initialPositionSampling();
|
||||
% - sampling the velocity distribution
|
||||
Velocities = ovenObj.initialVelocitySampling(this);
|
||||
|
||||
%% Solve ODE
|
||||
progressbar = Helper.parforNotifications();
|
||||
progressbar.PB_start(this.NumberOfAtoms,'Message',['Simulating 2-D MOT capture process for ' num2str(this.NumberOfAtoms,'%.0f') ' atoms:']);
|
||||
|
@ -7,10 +7,11 @@
|
||||
% - Automatically creates Beams objects
|
||||
OptionsStruct = struct;
|
||||
OptionsStruct.ErrorEstimationMethod = 'bootstrap'; % 'jackknife' | 'bootstrap'
|
||||
OptionsStruct.NumberOfAtoms = 5000;
|
||||
OptionsStruct.TimeStep = 50e-06; % in s
|
||||
OptionsStruct.SimulationTime = 4e-03; % in s
|
||||
OptionsStruct.SpontaneousEmission = true;
|
||||
OptionsStruct.Sideband = false;
|
||||
OptionsStruct.SidebandBeam = true;
|
||||
OptionsStruct.PushBeam = true;
|
||||
OptionsStruct.Gravity = true;
|
||||
OptionsStruct.BackgroundCollision = true;
|
||||
@ -86,6 +87,7 @@ Plotter.plotPhaseSpaceWithAccelerationField(Oven, MOT2D, MinimumVelocity, Maximu
|
||||
|
||||
%% - Plot Trajectories along the 3 directions
|
||||
MOT2D.NumberOfAtoms = 100;
|
||||
MOT2D.MagneticGradient = 0.42;
|
||||
MaximumVelocity = 150;
|
||||
IncidentAtomDirection = 0*2*pi/360;
|
||||
IncidentAtomPosition = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user