Skip to content

Instantly share code, notes, and snippets.

View mpreciado's full-sized avatar

Miguel Preciado mpreciado

View GitHub Profile
@mpreciado
mpreciado / NonParaxialExample.m
Last active November 26, 2018 20:38
Example of how an optical spectral line is mapped into the propagation angles, and the corresponding spatial projection, for non-paraxial regime (high angles)
%Example of how an optical spectral line is mapped into the propagation angles, and the corresponding spatial projection, for non-paraxial regime (high angles)
% In short, the radial components of frequencies and angles are related with radial_frequencies = sin(radial_angles),
% and the radial components of the spatial projection are related with radial_angles=atan(radial_spatial_projections).
% For small angles these trigonotmetric relations are just proportional relations (in paraxial aproximation).
% I will be surprises id there are not mistakes/bugs. Comments to @miguelscilight.
@mpreciado
mpreciado / CompAirySim.m
Last active October 24, 2018 09:31
Compensating beam designed in Miguel A. Preciado, Kishan Dholakia, and Michael Mazilu, "Generation of attenuation-compensating Airy beams," Opt. Lett. 39, 4950-4953 (2014)
% compensating Airy beam in Air
% Author: Miguel A. Preciado @miguelSciLight
%
% See publication below for details:
% Miguel A. Preciado, Kishan Dholakia, and Michael Mazilu, "Generation of attenuation-compensating Airy beams," Opt. Lett. 39, 4950-4953 (2014)
%
%Please cite the paper above for reference.
%
% More info:
% https://sites.google.com/view/miguelscilight/resources
@mpreciado
mpreciado / CompAirySim.m
Created October 17, 2018 21:06
Compensating beam designed in Miguel A. Preciado, Kishan Dholakia, and Michael Mazilu, "Generation of attenuation-compensating Airy beams," Opt. Lett. 39, 4950-4953 (2014)
% compensating Airy beam in Air
% Author: Miguel Preciado @miguelSciLight
% See publication below for details:
% Miguel A. Preciado, Kishan Dholakia, and Michael Mazilu, "Generation of attenuation-compensating Airy beams," Opt. Lett. 39, 4950-4953 (2014)
% https://www.researchgate.net/publication/284505770_Attenuation_compensating_Airy_beams_generated_by_using_a_digital_micro-mirror_device
% Please cite the paper above for reference.
close all;
clear all;
@mpreciado
mpreciado / CompAirySim.m
Created October 17, 2018 21:06
Compensating beam designed in Miguel A. Preciado, Kishan Dholakia, and Michael Mazilu, "Generation of attenuation-compensating Airy beams," Opt. Lett. 39, 4950-4953 (2014)
% compensating Airy beam in Air
% Author: Miguel Preciado @miguelSciLight
% See publication below for details:
% Miguel A. Preciado, Kishan Dholakia, and Michael Mazilu, "Generation of attenuation-compensating Airy beams," Opt. Lett. 39, 4950-4953 (2014)
% https://www.researchgate.net/publication/284505770_Attenuation_compensating_Airy_beams_generated_by_using_a_digital_micro-mirror_device
% Please cite the paper above for reference.
close all;
clear all;
@mpreciado
mpreciado / CompAirySim.m
Created October 17, 2018 21:06
Compensating beam designed in Miguel A. Preciado, Kishan Dholakia, and Michael Mazilu, "Generation of attenuation-compensating Airy beams," Opt. Lett. 39, 4950-4953 (2014)
% compensating Airy beam in Air
% Author: Miguel Preciado @miguelSciLight
% See publication below for details:
% Miguel A. Preciado, Kishan Dholakia, and Michael Mazilu, "Generation of attenuation-compensating Airy beams," Opt. Lett. 39, 4950-4953 (2014)
% https://www.researchgate.net/publication/284505770_Attenuation_compensating_Airy_beams_generated_by_using_a_digital_micro-mirror_device
% Please cite the paper above for reference.
close all;
clear all;
%% PARAMETERS
BeamAngle=90;
lambda=500e-9; %green wavelength 500 nm
%%
c=2.9979e8; %speed of light
xx=2e-6*(-1:0.01:1);
zz=2e-6*(-1:0.01:1);
@mpreciado
mpreciado / GaussianBeamAngles.m
Last active September 5, 2018 19:51
Calculation of angular spectrum of a Gaussian laser beam
clear all;
lambda=650e-9;
%beam radius (given by full width half maximum, FWHM)
radius=0.5e-3;
FWHM=2*radius;
x=(-1:1/40:1)*5*FWHM;