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 ...

Get Laser Beam Propagation in Nonlinear Optical Media now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.