A

Computer Codes for SFG Efficiency

A.1      The MATLAB codes for the collimated Gaussian beam case

In MATLAB environment, the following programs are used to find the sum-frequency generation power and energy conversion efficiencies (ηP and ηE, respectively) for collimated beams with Gaussian spatial and temporal distributions.

A.1.1    The file sfg_PE.m

%sfg_PE.m

clear all;

tic

K10 = 0.0001;

K1f = 5;

mk1 = 50;

dk1 = (K1f - K10)/mk1;

for ik = 1:mk1+1;

K1(ik) = K10 +(ik-1)*dk1;

%For eta_P, turn on the y(ik) in the next two lines

(by removing the % signs, if any)

%y(ik) = getysfg_p(K1(ik));

%y(ik) = 2*y(ik)/K1(ik);

%For eta_P, turn off the 2 lines for y(ik) below

(by inserting or retaining the % signs)

%For eta_E, turn off the y(ik) line ...

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.