O'Reilly logo

Laser Beam Propagation in Nonlinear Optical Media by Shekhar Guha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

B

Computer Codes for SHG Efficiency

B.1      MATLAB code for SHG efficiency of collimated Gaussian beams

In MATLAB environment, the following programs are used to find the second harmonic generation conversion efficiency for collimated beams with Gaussian spatial and temporal distributions.

B.1.1      shg_IPE.m

The program shg_IPE.m calls files getyshg_I.m, getyshg_P.m and the file getyshg_E.m to calculate the irradiance, power and energy conversion efficiencies of collimated Gaussian beams as a function of the intensity parameter K1 of the pump beam for the phase matched (σ = 0) case.

%shg_IPE.m

clear all;

tic

K10 = 0.00001;

K1f = 50;

mk1 = 200;

alk1 = log10(K10);

alk2 = log10(K1f);

dk1 = (K1f - K10)/mk1;

for ik = 1:mk1+1;

K1(ik) = K10 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required