clear all % In this code we are using a la mode to optimatize the mode matching and % to optimatize the Gouy phase between mirror 1 and mirror 2. All the units % are in meter w0=2.943*1e-5; % The Waist of the laser measured before the faraday z0_laser=-0.039; % position measured where the waist is located lamb= 532*10^-9; % wavelength of green light in mm lFaraday=.0638; % Length of the faraday z_FirstMir= .8178; % Distance from the Faraday to the mirror m1_m2= .300; %Distance from mirror 1 to mirror 2 m2_cav= .750; % Distance from mirror 2 to cavity cavLength= 37.79; % cavity length cavR= 59.80; % Radius of curvature of the cavity mirror %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Distances of the lenses from the faraday until the first mirror % d1=.130-lFaraday+abs(z0_laser); % Distance from the Faraday to first lens d1=.130; d2=.082; % distance from the first lens to second d3=.280; % distance from the second lens to third lens d4=.278; % distance from 3rd lens to first mirror d5=(d1+d2+d3+d4)+.150; % we can change this parameter d6=(d1+d2+d3+d4)+ m1_m2 + .400; % we can change this value %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Absolute Distance between the lenses and mirrors where the origin is % taken to be the begining of the faraday z0=lFaraday+z0_laser; % distance of the waist of the laser away from the % start of faraday dlens1=d1; % distance of the first lens from the faraday dlens2=d1+d2; % distance of the second lens from the faraday dlens3=dlens2+d3; %distance of the third lens from the faraday dmirror1=z_FirstMir; % distance of the first mirror from the faraday dmirror2=dmirror1+m1_m2; % distance of second mirror from the faraday dlens4=dmirror2+(4*.0254); % distance of fourth lens from the faraday dlens5=dlens4+(5*.0254); % distance of the fifth lens from the faraday dETM=dmirror2+m2_cav; % distance of the ETM from the faraday dITM=dETM+cavLength; % distance of the ITM from the faraday %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% greenxarm = beamPath; % defining the beamPath greenxarm.seedWaist(w0,z0,lamb); % set the waist of the laser beam and its % position % Waist inside the Cavity wInsideCav=sqrt((lamb/pi)*sqrt(cavLength*(cavR-cavLength))); greenxarm.targetWaist(wInsideCav,dITM,lamb); % targetWaist and its position %%%%%%%%%%%%% Let's take the ETM as it is a lens which focal is given by % the LensMaker's Equation 1/f=(n-1)[1/R1- 1/R2 + (n-1)d/(nR1R2) % Calculation of index of refraction wavelen=(532e-9)*1000000; % in micrometer n=sqrt(1 + (0.68374049400*(wavelen^2)/((wavelen^2)-0.00460352869)) + ... (0.42032361300*(wavelen^2)/((wavelen^2)-0.01339688560)) + ... (0.58502748000*(wavelen^2)/((wavelen^2)-64.49327320000))); fCurveMirror=-cavR/(n-1); greenxarm.addComponent(component.flatMirror(dmirror1,'First mirror')); greenxarm.addComponent(component.flatMirror(dmirror2,'Second Mirror')); greenxarm.addComponent(component.lens(fCurveMirror,dETM,'ETM')); greenxarm.addComponent(component.flatMirror(dITM,'ITM')); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % focal length of the lenses in meter f1=-.100; % focal length of first lens f2=-.4484; % focal length of second lens f3=.3966; % focal length of third lens f4=-.100; f5=.200; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% greenxarm.addComponent(component.lens(f1,dlens1, 'lens 1')); greenxarm.addComponent(component.lens(f2,dlens2, 'lens 2')); greenxarm.addComponent(component.lens(f3,dlens3, 'lens 3')); greenxarm.addComponent(component.lens(f4,dlens4, 'lens 4')); greenxarm.addComponent(component.lens(f5,dlens5, 'lens 5')); figure(1) greenxarm.plotSummary(-.1:.01:2) focalLengthList =[-.075;-.100;-.125]; focalLengthList1=[-.1;-.2;.150;.175;.200]; focalLengthList2=[-.2;-.1;.100;.250;.050]; focalLengthList3=[.400;.050;.100;.200;.125]; focalLengthList4=[.200;.500;.150;.400;.175]; %Type of lenses we have % divergingFocalList = [-.012;-.024;-.048;-.1;-.25;-.75;inf]; % convergingFolcaList = [.025;.05;.075;.1;.125;.150;.200;.175;.400;.500;inf]; % new list of lenses for optimization divergingFocalList = [-.008;.010;-.012;-.015;-.020;-.022;-.024;-.025;... -.048;-.050;-.1;-.150;-.25;-.075;inf]; convergingFolcaList = [.025;.030;.040;.05;.075;.1;.125;.150;.200;.175;... .250;.300;.350;.400;.500;inf]; % This will give us the right Gouy phase between mirrors (zR ~= mirror % spacing) greenxarm.targetWaist(225e-6,z_FirstMir+m1_m2/2,532e-9); lensList = component.lens(focalLengthList); lensList2= component.lens(focalLengthList1); lensList3= component.lens(focalLengthList2); lensList4= component.lens(focalLengthList3); lensList5= component.lens(focalLengthList4); divLensList = component.lens(divergingFocalList); conLensList = component.lens(convergingFolcaList); % [pathList, overlapList]=greenxarm.chooseComponents( ... % 'lens 1', divLensList, [.050 .100], ... % 'lens 2', [divLensList; conLensList], [.020 .040], ... % 'lens 3', divLensList, [.150 .150], ... % '-r', ... % '-t', .001); [pathList, overlapList]=greenxarm.chooseComponents( ... 'lens 1', divLensList, [.130 (3*.0254)], ... 'lens 2', [divLensList; conLensList], [dlens2 (10*.0254)], ... 'lens 3', divLensList, [dlens3 (10*.0254)], ... '-t', .01); pathWithInputLensesOptimized = pathList(1); pathWithInputLensesOptimized.targetWaist(wInsideCav,dITM,lamb); [pathList1, overlapList1]=pathWithInputLensesOptimized.chooseComponents(... 'lens 4', [divLensList; conLensList], [dlens4 dlens4+(2*.0254)],... 'lens 5', [conLensList; divLensList], [dlens5-(2*.0254) dlens5],... '-v', ... '-t', 0); figure(2) pathList1(1).plotSummary(-.1:.01:2) figure(3) pathList1(1).plotSummary() % This just show the entire range