-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.html
More file actions
199 lines (193 loc) · 18.7 KB
/
index.html
File metadata and controls
199 lines (193 loc) · 18.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>mlSNLO-batch-README.md</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
<body class="stackedit">
<div class="stackedit__left">
<div class="stackedit__toc">
<ul>
<li><a href="#mlsnlo-batch">mlSNLO-batch</a>
<ul>
<li></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="stackedit__right">
<div class="stackedit__html">
<h1 id="mlsnlo-batch">mlSNLO-batch</h1>
<p>Example batch scripts for mlSNLO nonlinear optics numerical modeling software. These examples work for the MATLAB App version of mlSNLO which requires a MATLAB license. For more information see <a href="http://www.as-photonics.com/products/mlsnlo">as-photonics.com/products/mlsnlo</a>.</p>
<p>Below are short descriptions of each mlSNLO model function, a link to the text help displayed in SNLO, and some example scripts which demonstrate how to call the model function from a MATLAB script for use in batch runs.</p>
<h3 id="table-of-contents">Table of contents</h3>
<ul>
<li><a href="#introduction">Introduction, conventions and syntax</a></li>
<li><a href="#snlo-functions">SNLO functions</a></li>
<li><a href="#qmix">Qmix</a></li>
<li><a href="#ncpm">Ncpm</a></li>
<li><a href="#bmix">Bmix</a></li>
<li><a href="#focus">Focus</a></li>
<li><a href="#cavity2">Cavity2</a></li>
<li><a href="#gvm">GVM</a></li>
<li><a href="#opo-angles">OPO angles</a></li>
<li><a href="#qpm">QPM</a></li>
<li><a href="#pw-mix-lp">PW-mix-LP</a></li>
<li><a href="#pw-mix-sp">PW-mix-SP</a></li>
<li><a href="#pw-cav-lp">PW-cav-LP</a></li>
<li><a href="#pw-mix-bb">PW-mix-BB</a></li>
<li><a href="#pw-opo-bb">PW-OPO-BB</a></li>
<li><a href="#pw-opo-sp">PW-OPO-SP</a></li>
<li><a href="#2d-mix-lp">2D-mix-LP</a></li>
<li><a href="#2d-mix-sp">2D-mix-SP</a></li>
<li><a href="#2d-cav-lp">2D-cav-LP</a></li>
<li><a href="#opg">OPG</a></li>
</ul>
<h3 id="introduction">Introduction</h3>
<p>These scripts are MATLAB scripts. They require the MATLAB App version of mlSNLO to run. These files are examples of how to call most SNLO models from a batch script. This is often useful to optimize the design of your nonlinear optical device; for example, you might want to choose the nonlinear crystal length with produces the largest output energy of a pulsed second harmonic generation device. Using a batch script like these examples could automate this optimization: set up the script, press ‘Run’ and view the results.</p>
<p>Each example script is comprised of a for loop in which iteratively creates a set of inputs for an SNLO model function, calls the model and passes it the set of inputs, simulates pressing the ‘Run’ (and sometimes ‘Accept’) buttons on the model, loads the model output from file, processes and stores the result.</p>
<p>The inputs for each SNLO function match the main input form input boxes. The inputs are passed to each SNLO function as an input argument consisting of a MATLAB data structure with fieldnames the model requires, each field populated with values with units that match the input form labels.</p>
<p>Each example script includes many comments explaining what they do.</p>
<p>For each SNLO modeling function below, there is a link to the ‘Help’ text file and link to any example batch scripts.</p>
<p>The help text files here are the ones displayed after clicking the ‘Help’ button in the main menu of SNLO.</p>
<p>Additional information about how to specify the model’s input parameters can be found at</p>
<h3 id="snlo-functions">SNLO functions</h3>
<p>(in the order they appear in the main menu)</p>
<h4 id="qmix">Qmix</h4>
<p>QMIX helps you quickly select the best crystal for your application from a list of over 60 crystals. It calculates all the possible phase-matching orientations for the chosen crystal at the wavelengths specified, returning phase-matching angles, polarizations, refractive indexes, group velocities, group delay dispersion, effective nonlinearity, crystal tilt tolerance, acceptance angles, acceptance bandwidths, and acceptance temperatures. The three beams are assumed to have collinear propagation vectors. If the nonlinearity, deff, is zero, the other properties are not calculated. (If you want to find noncritical wavelengths, use function Ncpm.)</p>
<ul>
<li><a href="helpfiles/Qmix_h.txt">helpfiles/Qmix_h.txt</a></li>
<li><a href="example_script_qmix.m">example_script_qmix.m</a></li>
</ul>
<h3 id="ncpm">Ncpm</h3>
<p>NCPM (noncritical phase matching) helps you quickly search the list of crystals for one that can noncritically phase match your wavelengths. Noncritical phasematching refers to collinear phase matching with no birefringent walk off. It is desirable for efficient mixing of weak, tightly focused beams, and for maintaining the widest acceptance angle for all three beams.</p>
<ul>
<li><a href="helpfiles/Ncpm_h.txt">helpfiles/Ncpm_h.txt</a></li>
<li><a href="example_script_ncpm.m">example_script_ncpm.m</a></li>
</ul>
<h4 id="bmix">Bmix</h4>
<p>Bmix calculates the properties of biaxial crystals for propagation in any direction including out of the principal planes (in contrast to Qmix where propagation in a principal plane is assumed). The calculations are based on the d-tensor and Sellmeier listed in Qmix. Phase matching curves are computed along with the associated effective nonlinearity, walkoff, and acceptance angles. The purple circle on the phase matching plot indicates the location of the optic axes in the x-z plane. Parallel propagation directions (k vectors) of the three interacting waves red1, red2, and blue are assumed.</p>
<ul>
<li><a href="helpfiles/Bmix_h.txt">helpfiles/Bmix_h.txt</a></li>
<li><a href="example_script_bmix.m">example_script_bmix.m</a></li>
</ul>
<h4 id="focus">Focus</h4>
<p>FOCUS helps calculate the curvature of a Gaussian beam at a specific location that will give a certain waist size at a certain location. This information is needed in the two-dimensional mixing models 2D-mix-LP and 2D-mix-SP if the beams are focusing (have curved wavefronts).</p>
<ul>
<li><a href="helpfiles/Focus_h.txt">helpfiles/Focus_h.txt</a></li>
<li><a href="example_script_focus.m">example_script_focus.m</a></li>
</ul>
<h4 id="cavity2">Cavity2</h4>
<p>This function is an extension of the original Cavity function. It adds the ability to model astigmatic cavities, with the astigmatism arising from tilted and curved mirrors and Brewster-cut crystals. The cavity is assumed to be a ring with two curved mirrors bracketing the nonlinear crystal. The ring is assumed to be planar so the in-plane and out-of-plane mode profiles are independent of one another and can be computed separately. The mode profiles for the two planes are both computed and displayed whenever the function is run. The function also allows user specification of a disturbance to the cavity. Disturbances can be either a tilt or a displacement of the mode in the plane of the cavity, and they can be located anywhere in the cavity. This calculation is useful in understanding how tilting a cavity mirror shifts the mode or how refraction in a tuning prism shifts the mode.</p>
<ul>
<li><a href="helpfiles/Brewster_cavity_help.txt">helpfiles/Brewster_cavity_help.txt</a></li>
</ul>
<h4 id="gvm">GVM</h4>
<p>GVM calculates group velocity (mis)match for noncollinear phase matching. The paper “Group-velocity-matched three-wave mixing in birefringent crystals” Optics Letters vol. 26, page 719 (2001) describes the method of group velocity matching in birefringent crystals implemented in this function. This paper is available online at <a href="http://www.as-photonics.com/Publications.html">http://www.as-photonics.com/Publications.html</a>. The calculations are based on the d-tensor and Sellmeier equations displayed in Qmix. The book “Crystal Nonlinear Optics: with SNLO examples” (<a href="http://as-photonics.com/book">as-photonics.com/book</a>) also describes the method.</p>
<ul>
<li><a href="helpfiles/GVM_h.txt">helpfiles/GVM_h.txt</a></li>
<li><a href="example_script_gvm.m">example_script_gvm.m</a></li>
</ul>
<h4 id="opo-angles">Opo angles</h4>
<p>Opoangles computes OPO/OPA red1 and red2 wavelengths as a function of propagation angle in birefringent crystals assuming the blue (pump) wavelength is fixed. For biaxial crystals, propagation is in one of the principal planes of the crystal so the Plane radio buttons are activated. Select the plane of interest. In biaxial crystals the angle is theta, measured from the Z axis for propagation in the XZ and YZ planes. For propagation in the XY plane the angle is phi, measured from the X axis toward the Y axis. Calculations are based on the d-tensor and Sellmeier listed in Qmix.</p>
<ul>
<li><a href="helpfiles/Opoangles_h.txt">helpfiles/Opoangles_h.txt</a></li>
<li><a href="example_script_opoangles.m">example_script_opoangles.m</a></li>
</ul>
<h4 id="qpm">QPM</h4>
<p>QPM calculates properties of quasiphasematched materials including the poling, or domain reversal, period (always specified at room temperature), the temperature bandwidth, the frequency bandwidth, the group velocities, the group delay dispersions. In addition the tuning of phase matched red1 and red2 wavelengths due to blue (pump) tuning or crystal temperature tuning can be computed using the Pump Tune and Temp Tune buttons. The Sellmeier equations are those referenced in Qmix when a crystal is selected. The temperature range and acceptance bandwidths are calculated as described in Qmix help.</p>
<ul>
<li><a href="helpfiles/QPM_h.txt">helpfiles/QPM_h.txt</a></li>
<li><a href="example_script_qpm.m">example_script_qpm.m</a></li>
</ul>
<h4 id="pw-mix-lp">PW-mix-LP</h4>
<p>PW-mix-LP computes three-wave mixing process for long-pulse plane- waves. The input irradiances are those of the central rays of spatial lowest-order Gaussian beams with diameters and energies specified in the input form. This function ignores birefringent and group velocity walkoff. It is intended for very quick evaluation of a proposed mixing process.</p>
<ul>
<li><a href="helpfiles/PWmixLP_h.txt">helpfiles/PWmixLP_h.txt</a></li>
<li><a href="example_script_pw_mix_lp.m">example_script_pw_mix_lp.m</a></li>
</ul>
<h4 id="pw-mix-sp">PW-mix-SP</h4>
<p>PW-mix-SP computes three-wave mixing process for plane waves with irradiances equal to those of the central rays of spatial lowest order Gaussian beams with beam diameters and energies specified in the input form. It ignores birefringent walkoff but includes group velocity effects, so it is useful for modeling very short pulses. cw light is not allowed in this function. Pulses are Gaussian or Supergaussian in time at the input face. The three input pulses can have different durations and delays.</p>
<ul>
<li><a href="helpfiles/PWmixSP_h.txt">helpfiles/PWmixSP_h.txt</a></li>
<li><a href="example_script_pw_mix_sp.m">example_script_pw_mix_sp.m</a></li>
</ul>
<h4 id="pw-cav-lp">PW-cav-LP</h4>
<p>PW-cav-LP models plane-wave mixing in cavities. Input irradiances are those of the central rays of lowest order Gaussian beams with diameters specified by the Beam diam. input values. You can model an OPO, cavity resonant SHG or any other cavity mixing process by specifying the input beams and the reflectivity of the mirrors at those wavelengths. The crystal mixing is similar to PW-mix-LP. The cavity configuration can be standing wave or ring.</p>
<ul>
<li><a href="helpfiles/PWcavLP_h.txt">helpfiles/PWcavLP_h.txt</a></li>
<li><a href="example_script_pw_cav_lp.m">example_script_pw_cav_lp.m</a></li>
</ul>
<h4 id="pw-mix-bb">PW-mix-BB</h4>
<p>PW-mix-BB computes three-wave mixing processes for plane waves with input irradiances equal to those of the central ray of lowest order Gaussian beams with energy and diameter specified on the input form. It ignores birefringent walkoff but includes group velocity effects. It is intended for modeling multi-longitudinal-mode pulses. The number of modes populated in each model run is sufficient to cover the specified bandwidth for each beam. Quantum noise is automatically added to the red1 and red2 waves. The noise bandwidths of the red waves can be extended by specifying the bandwidth parameter. This inclusion of quantum noise is to approximate OPG modeling. However, to properly model OPG the spatial structure of the red beams should be noisy as well.</p>
<ul>
<li><a href="helpfiles/PWmixBB_h.txt">helpfiles/PWmixBB_h.txt</a></li>
<li><a href="example_script_pw_mix_bb.m">example_script_pw_mix_bb.m</a></li>
</ul>
<h4 id="pw-opo-bb">PW-OPO-BB</h4>
<p>PW-OPO-BB models broad-bandwidth, nanosecond, plane-wave (actually the central ray of a spatial Gaussian) OPO’s. It is similar to PW-cav-LP except it allows for differing group velocities for the three waves and broad bandwidths. The mathematical methods are described in paper “Numerical models of broad bandwidth nanosecond optical parametric oscillators” JOSA B vol. 16 p. 609 (1999), available at <a href="http://www.as-photonics.com/Publications.html">http://www.as-photonics.com/Publications.html</a> This function permits studies of unseeded OPO’s and the transition to seeding. It also models double resonance effects and pumping by multi-mode lasers.</p>
<ul>
<li><a href="helpfiles/PWopoBB_h.txt">helpfiles/PWopoBB_h.txt</a></li>
<li><a href="example_script_pw_opo_bb.m">example_script_pw_opo_bb.m</a></li>
</ul>
<h4 id="pw-opo-sp">PW-OPO-SP</h4>
<p>PW-OPO-SP models a singly-resonant, plane-wave, synchronously-pumped OPO. The irradiance of the plane pump wave is set equal to the central ray of a lowest-order spatial Gaussian whose beam diameter is specified in the input form under ‘Beam diameter’. This function includes group velocity and group delay dispersion but not higher order dispersion. The OPO cavity is a ring, with only the red1 wave resonated. The duration of the blue (pump) pulses are specified.</p>
<ul>
<li><a href="helpfiles/PWopoSP_h.txt">helpfiles/PWopoSP_h.txt</a></li>
<li><a href="example_script_pw_opo_sp.m">example_script_pw_opo_sp.m</a></li>
</ul>
<h4 id="d-mix-lp">2D-mix-LP</h4>
<p>2D-mix-LP is similar to PW-mix-LP except it handles the full spatial profiles so it can realistically model circular or elliptical beams with Gaussian or Supergaussian transverse profiles. It includes diffraction, birefringent walkoff, displaced beams, etc. for gaussian or super-guassian pulses or cw light. The light is assumed to be monochromatic and the pulses are assumed to be long enough that group velocity effects are unimportant. Maxwell’s equations are integrated using split-step methods to give true diffractive calculations.</p>
<ul>
<li>2D-mix-LP now allows arbitrary, user-specified spatial and temporal input electric field profiles. These examples show how to do this:
<ul>
<li><a href="example_custom_input_fields_2d_mix_lp_cw.m">example_custom_input_fields_2d_mix_lp_cw.m</a>: all-continuous wave case</li>
<li><a href="example_custom_input_fields_2d_mix_lp_pulsed.m">example_custom_input_fields_2d_mix_lp_pulsed.m</a>: all-pulsed case</li>
<li><a href="example_custom_input_fields_2d_mix_lp_cw_and_pulse_mixed.m">example_custom_input_fields_2d_mix_lp_cw_and_pulse_mixed.m</a>: a combination of pulsed and cw input beams</li>
<li><a href="example_2d_mix_lp_shg_and_thg_generation.m">example_2d_mix_lp_shg_and_thg_generation.m</a>: a two-crystal system using the output of an second-harmonic generator as the input for a third-harmonic generator</li>
<li><a href="example_prop_2d_mix_lp_shg_and_thg_generation.m">example_prop_2d_mix_lp_shg_and_thg_generation.m</a>: a two-crystal system using the output of an second-harmonic generator as the input for a third-harmonic generator with a free-space FFT propagation bwetween the two crystals</li>
</ul>
</li>
<li><a href="helpfiles/2DmixLP_h.txt">helpfiles/2DmixLP_h.txt</a></li>
<li><a href="example_script_2d_mix_lp.m">example_script_2d_mix_lp.m</a></li>
<li><a href="example_script_2d_mix_lp_vary_deltak.m">example_script_2d_mix_lp_vary_deltak.m</a></li>
</ul>
<h4 id="d-mix-sp">2D-mix-SP</h4>
<p>2D-mix-SP models single-pass mixing with diffraction, birefringent walkoff, group velocity walk off, and group velocity dispersion. This is a slow memory hog so try to select the best values for the time and spatial grids using the faster functions PW-mix-SP, PW-mix-LP, and 2D-mix-LP before running it.</p>
<ul>
<li>2D-mix-SP now allows arbitrary, user-specified input temporal pulse profiles (still limited to Gaussian or super-Gaussian spatial profiles). 1 example is included:
<ul>
<li><a href="example_script_2d_mix_sp_custom_pulse_profile.m">example_script_2d_mix_sp_custom_pulse_profile.m</a>:</li>
</ul>
</li>
<li><a href="helpfiles/2DmixSP_h.txt">helpfiles/2DmixSP_h.txt</a></li>
<li><a href="example_script_2d_mix_sp_vary_deltak.m">example_script_2d_mix_sp_vary_deltak.m</a></li>
<li><a href="example_script_2d_mix_sp_vary_deltak_2.m">example_script_2d_mix_sp_vary_deltak_2.m</a></li>
</ul>
<h4 id="d-cav-lp">2D-cav-LP</h4>
<p>2D-cav-LP is similar to PW-cav-LP except it handles the full spatial profiles so it can realistically model beams with Gaussian or Supergaussian transverse profiles. It includes diffraction, birefringent walkoff, displaced beams, etc. for pulsed or cw light. The light is assumed to be monochromatic and the pulses are assumed to be long enough that group velocity effects are unimportant.</p>
<ul>
<li><a href="helpfiles/2DcavLP_h.txt">helpfiles/2DcavLP_h.txt</a></li>
<li><a href="example_script_2d_cav_lp.m">example_script_2d_cav_lp.m</a></li>
</ul>
<h4 id="opg">OPG</h4>
<p>OPG models single-pass mixing with diffraction, birefringent walkoff, group velocity walk off, and group velocity dispersion with simulated quantum noise in both red waves. The quantum noise is automatically computed based on the inputs. Optional red seed light can be added to the noise by specifying red pulse energies and pulse durations.</p>
<ul>
<li><a href="helpfiles/OPG_h.txt">helpfiles/OPG_h.txt</a></li>
<li><a href="example_script_opg.m">example_script_opg.m</a></li>
<li><a href="example_script_opg_vary_deltak.m">example_script_opg_vary_deltak.m</a></li>
<li><a href="example_script_opg_vary_pump_energy.m">example_script_opg_vary_pump_energy.m</a></li>
</ul>
<h4 id="other-files">Other files:</h4>
<ul>
<li><a href="simple_freespace_propagate.m">simple_freespace_propagate.m</a> A simple function to propagate a beam in free space using FFT</li>
<li><a href="example_simple_freespace_propagate.m">example_simple_freespace_propagate.m</a> A simple example script to use the script (simple_freespace_propagate.m)</li>
<li><a href="crystal_info.m">crystal_info.m</a> a script that does most of what snlo_ref_ind_func does but without the graphical user interface components; it uses ref_ind and N12 to find refractive indices for isotropic, uniaxial, and biaxial crystals, as well as group velocity indices, group delay dispersions, third order dispersions, walkoff angles, and thermo optic coefficients for a given crystal, temperature, wavelength, and propagation direction.</li>
</ul>
</div>
</div>
</body>
</html>