Code covered by the BSD License  

Highlights from
OSCAR

image thumbnail

OSCAR

by

 

08 Jul 2008 (Updated )

An optical FFT code to simulate Fabry Perot cavities with arbitrary mirror profiles

Example_telescope.m
clear all; close all; clear classes
addpath(genpath('Classes'));

disp('---------------------------------------------------------------------------')
disp('                  OSCAR V3.14                                      ')
disp('  ')


% Define the grid for the simulation: 256 X 256, 30 cm X 30 cm
G1 = Grid(256,0.40);

% Define one incoming beam (beam radius: 5 cm) 
E_input = E_Field(G1,'w',0.05);

% Propagate over 100m
E_2 = Propagate_E(E_input,100);

% Then define a telescope as:
% 1 first lens of focal length 8.2 m
% Propagate 4.45 m
% 1 second lens of focal length -3.6 m
% Then propagate 0.6 m

[E3,G3] = Focus_beam_with_telescope(E_2,[8.2 4.45 -3.6 0.6]);

% Then display the beam parameters:
disp('FFT code result:')
Fit_TEM00(E3)

% Do the same thing with the ABCD matrix
Lambda = E_input.Wavelength;
q_start = 1/(- 1i*Lambda/(pi*0.05^2));

Mat_propa =  [1 0.6;0 1]*[1 0;1/3.6 1]*[1 4.45;0 1]*[1 0;-1/8.2 1]*[1 100;0 1];

q_propa = (Mat_propa(1,1)*q_start + Mat_propa(1,2))/(Mat_propa(2,1)*q_start + Mat_propa(2,2));

q_circ_inv = 1/(q_propa);
RofC = 1/real(q_circ_inv);
Beam_rad = sqrt( 1/(-imag(q_circ_inv)*pi/(Lambda)));

disp('ABCD matrix result:')
fprintf('beam radius: %g      wavefront RofC: %g \n',Beam_rad,RofC)

Contact us