Software … powerful tools for your research & development!

RP Resonator – Advanced Software for Laser Resonator Design and Optimization

The Basic Concept of the User Interface

The software can be controlled with simple forms, where one just enters a couple of input parameters, start the calculation and obtains various outputs:

  • Some numerical output data can be displayed in form fields and in the output area on the right side.
  • In the form, there can be even graphical displays, e.g. colored bars.
  • Further, there can be multiple graphical diagrams for showing things like reflection spectra.

See three examples of such forms (from demo files delivered with the software) – for a linear or ring laser resonator, and for focusing of a laser beam:

form for linear resonator
form for ring resonator
custom form for focusing of a laser beam

It is important to note that the forms and the underlying calculations are not hard-coded. You obtain script files, i.e., text files which define a multilayer structure, all the calculations and the generated graphical diagrams, and (optionally) a custom form. The user interface of the software provides powerful editors and a lot of additional helpful features for modifying such scripts or developing new scripts.

Scripting gives you enormous flexibility. With that, you can implement even most sophisticated models; you can even do full-blown programming. Competing programs which do not offer scripting cannot compete with RP Resonator in terms of flexibility:

  • The resonators (or any single-pass optical arrangements) can be easily parameterized instead of using simple numerical values for various properties. That means that their properties are calculated from a set of given parameters. That is often highly convenient in practical work. For example, you can specify the total length of a resonator arm and that of a laser crystal, which is to be placed in the middle of that arm. The length of the passes in air left and right of the crystal can then be automatically calculated.
  • One can produce parts of optical setups with a loop, for example for repeating certain sequences of optical components with a variable number.
  • RP Resonator allows you to do optimizations with arbitrary mathematical forms of the figure-of-merit function. Other programs normally only allow one to enter parameters of a predetermined figure-of-merit function.
  • You can easily implement additional calculations – for example, average quantities over some angular ranges or check effects on ultrashort pulses.
  • You can create essential any kinds of graphical plots for analyzing the results – not just choose from a defined set of diagrams.
  • You can copy & paste within and between scripts, which is much simpler than going through many forms and entering inputs again.

The Script Language

RP Resonator supports a very powerful script language. Each input script contains everything from the definition of a resonator to the calculations to be made and the resulting graphics. (Of course, you can store frequently used script parts in external files and easily call them in your main script.)

Since V3, one can even define a custom form in a script (see below). This feature allows one to combine the enormous flexibility of the script language with the nice handling of forms for input and output of data.

Some code snippets show you that the script language is easy to use. The first example shows how a simple resonator is defined:

F_cr := 0.3  { diopters of the laser crystal }

resonator: standing-wave
* mirror (M1): R = 500 mm
* air: d = 100 mm
* lens (Crystal): f = if F_cr <> 0 then 1 / F_cr
* air: d = 200 mm
* mirror (M2): R = 0 { no curvature }
resonator end

Here, the arm lengths are simply defined with numerical values, but the dioptric power of the laser crystal is given as a parameter which can be varied, for example, in graphics.

The second example shows you how to display calculated mode radii, well formatted with 3 valid digits and units of meters:

show "w at M1:       ", w(zm[M1], lambda_ref):d3:"m"
show "w at Crystal:  ", w(zm[Crystal], lambda_ref):d3:"m"
show "w at M2:       ", w(zm[M2], lambda_ref):d3:"m"

Finally, we define graphical output, showing the beam radius vs. position:

diagram 1:

"Beam Radius vs. Position"

x: 0, L_res / cm
"z position (cm)", @x
y: 0, 800
frame
hx
hy

f: w(x * cm, lambda_ref) / um,
   "w(z) (µm)",
   color = blue, width = 3

You will soon appreciate the manifold advantages of the scripting approach:

  • You can simply copy and paste parts of the provided demo files, or of your earlier script files, in order to reuse code.
  • Let substantial parts of the required scripts be generated based on form inputs (see below).
  • In complicated cases, RP Photonics can send you some lines of code.
  • The scripting approach is extremely flexible, allowing you e.g. to systematically vary certain parameters, import and export data in various formats, set up new types of diagrams, or mathematically process data.
  • A script file perfectly documents your work. When you read it later on, you easily see what you have done. You do not need to remember e.g. what settings you have done in some interactive windows.

Script Editors

For editing script code, the software offers powerful editors and related tools. A screen shot shows an editor:

script editing in RP Fiber Power

Some great features of such editors:

  • Multilevel undo/redo functionality
  • Syntax highlighting: recognized command or function names, keywords, comments etc. are shown with different colors. That makes it easier to understand the structure.
  • Parameter hints: if you type in a function name followed by a parenthesis, the editor displays information on the required parameter list. That way it becomes much simpler to utilize the hundreds of supported functions.
  • Syntax check: you can quickly have the syntax of a script checked without executing it.
  • Code snippets library: you can easily insert certain frequently used parts of code into your script. (See the screen shot below.) Users can create own code snippets as an extension for that library.
code snippets library

For inserting resonator definitions, one can also use the input wizards form. Just type numbers or even mathematical expressions into the form fields, and you instantly see the corresponding script code being generated:

input wizards form for generating script commands in RP Resonator

Graphical Output

Your script can define one or many different types of diagrams for visualizing the results of the calculations. Examples are shown on the pages for various example cases. Each diagram is shown in a separate window. Below you see an example of such a graphics window, showing the beam radius vs. position within a resonator.

a graphics window of RP Resonator

Those graphics windows have plenty of convenient features:

  • measure positions and distances using one or two cursors
  • save the graphics in GIF or PNG format
  • export numerical data
  • copy the graphics to the Windows clipboard
  • recall the graphics from the last calculation run, so that you can clearly see any differences
  • browse in multiple versions of a diagram (up to 1000) – for example, resonators modes for different values of the thermal lens

Comprehensive Documentation

RP Resonator comes with very well worked out documentation, which allows you to have a quick start and work efficiently even when doing sophisticated modeling:

  • There is a manual in PDF format, explaining in detail (on about 40 pages) the principles of the physical model, the user interface, the script language, etc.
  • The context-sensitive online help function is even more comprehensive. See the screen shot below to get an impression.
online help of RP Resonator

Technical Support

Any remaining problems can be addressed with the technical support. We make sure that any problems you may have will soon be solved.

If you have any further questions or need a quotation: