Appendix C: Programming Techniques

C.1Programming Δk

As an example, consider Δk for a Type I difference-frequency interaction (o e + e) in a positive uniaxial crystal

Δk(λ1,λ2,T,θ)=2π(no(λ1)λ1ne(λ2,θ)λ2ne(λ3,θ)λ3),(C.1)

where λ3 is determined from energy conservation. The pseudocode for Δk appears as follows:

 Function Deltak(lambda1,lambda2,temp,theta)
   lambda3=1/(1/lambda1-1/lambda2)
   Deltak=2*pi*(no(lambda1)/lambda1-ne(lambda2,theta)/lambda2-ne(lambda3,theta)/lambda3)
   return Deltak
 EndFunction

Note that the program makes two calls to subfunctions no(lambda) and ne(lambda,theta). no(lambda) is a function that returns the index of refraction based on the Sellmeier equation for the ordinary index. ne(lambda,theta) returns the extraordinary ...

Get Fundamentals of Nonlinear Optics, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.