Skip to content

smithjj/mlSNLO-batch

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

mlSNLO-batch

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 as-photonics.com/products/mlsnlo.

Table of contents

Introduction

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.

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.

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.

Each example script includes many comments explaining what they do.

For each SNLO modeling function below, there is a link to the 'Help' text file and link to any example batch scripts.

The help text files here are the ones displayed after clicking the 'Help' button in the main menu of SNLO.

SNLO functions

(in the order they appear in the main menu)

Qmix

Ncpm

Bmix

Focus

Cavity2

GVM

Opo angles

QPM

PW-mix-LP

PW-mix-SP

PW-cav-LP

PW-mix-BB

PW-OPO-BB

PW-OPO-SP

2D-mix-LP

2D-mix-SP

2D-cav-LP

OPG

Other files:

  • simple_freespace_propagate.m A simple function to propagate a beam in free space using FFT
  • example_simple_freespace_propagate.m A simple example script to use the script (simple_freespace_propagate.m)
  • crystal_info.m 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.

About

Example batch scripts for mlSNLO nonlinear optics numerical modeling software

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages