RP Photonics logo
RP Photonics
Modeling & Design Software
Technical consulting services on lasers, nonlinear optics, fiber optics etc.
Profit from the knowledge and experience of a top expert!
Powerful simulation and design software.
Make computer models in order to get a comprehensive understanding of your devices!
Success comes from understanding – be it in science or in industrial development.
The famous Encyclopedia of Laser Physics and Technology – available online for free!
The ideal place for finding suppliers for many photonics products.
Advertisers: Make sure to have your products displayed here!
powerful tools for efficient laser development and laser science
This page gives you an overview on our software products.
RP Fiber Calculator is a convenient tool for calculations on optical fibers.
RP Fiber Power is an extremely flexible tool for designing and optimizing fiber devices.
RP Resonator is a particularly flexible tool for laser resonator design.
RP ProPulse can simulate the pulse evolution e.g. in mode-locked lasers and sync-pumped OPOs.
RP Coating is a particularly flexible design tool for dielectric multilayer systems.
RP Q-switch can simulate the power evolution in Q-switched lasers.
Most of our software products support a powerful script language, which gives you an extraordinary degree of flexibility.
Here you learn about software license conditions, updates and upgrades, etc.
Competent technical support is a key quality associated with software from RP Photonics.
RP Photonics has distributors in various countries.
The RP Photonics Software News keep you updated on our developments and give the users additional interesting hints.
Here you can make inquiries e.g. concerning technical details, prices and quotations.
en | de

Custom Forms in Software from RP Photonics

Some of our software supports custom forms:

The Principle of Custom Forms

Custom forms are forms which can be tailored to your specialized needs. They are not defined in the software itself, but rather within scripts. (Below we show you some simple examples.) In contrast to the source code of our software, such scripts can be viewed, modified or made from scratch by any user. That opens very interesting options:

  • Some users do not want to spend too much time on technical details. These can use custom forms made by others – for example, by their colleagues, or by RP Photonics within the technical support. For them, it is very simple to work with the software, utilizing only a graphical user interface: just put the input values into such a form, then “execute” it (e.g. by pressing F8), and you get the outputs displayed in the same form and/or in the generated graphical diagrams.
  • Power users can make their own custom forms. It is not that difficult – see an example below. For an easy start, you can take some existing form and modify it.

You will love these custom forms! They provide an amazing combination of flexibility and ease of use. As a power user, you will probably soon make custom forms for all sorts of purposes – possibly even outside the specific technical context of the software.

Example 1 with RP Fiber Power: Fiber Amplifier

Below you see a custom form made with RP Fiber Power for calculations on Yb-doped fiber amplifiers, which is provided with the software as a demo file. If one opens that script, the software immediately goes into “custom form mode”, i.e., it displays that form. If you enter some input values and “execute” the form, you see the following:

custom form for fiber amplifier calculations

The input values are stored in a separate data file. You can easily switch between different data sets.

The software can also one or more graphical diagrams (not shown here) – just as you can get with any scripts.

Here you can see part of the code defining the above form:

Custom form:
--------------------------------------------------------------
$font: "Arial", bold, size=24
Yb-doped Fiber Amplifier
$font: "Courier New", size=11, space=2.1
$tabcontrol, size=(620, 0)
$tab "Fiber details"
Core material:       ##########################
$input (combobox:"Yb-germanosilicate","Yb-phosphosilicate") fiber$
Yb concentration:    ############  Core diameter: ############
$input N_Yb:d6:"/m^3", min=0, max=1e30
$input d_core:d6:"m", min=0, max=1e-3
Pump mode radius:    ############  Fiber length:  ############
$input w_p:d6:"m", min=0, max=1e-3
$input L_f:d6:"m", min=0, max=1000
Signal mode radius:  ############
$input w_s:d6:"m", min=0, max=1e-3
$tab "Operation parameters"
Pump power:          ############ at ##########  #  backward
$input P_p_in:d6:"W", min=0, max=10, bgcolor=(if P_p_in > 10 then rgb(1, 0.8, 0.8) else white)
$input l_p:d6:"(n)m"
$input (checkbox) bw_pump
Signal input power:  ############ at ##########
$input P_s_in:d6:"W", min=0, max=10
$input l_s:d6:"(n)m"
$tabcontrol end
--------------------------------------------------------------

You can see here that it is not very difficult to define such a form. You could easily add some more input fields and get additional things calculated and displayed.

Of course, all relevant details are well explained in the PDF manual as well as in the context-sensitive online help system. If you encounter any problems, you will get help via the technical support.

Several demo files for RP Fiber Power contain custom forms; they are designed for calculations on fiber amplifiers, tapered fibers, actively Q-switched Nd:YAG lasers, regenerative amplifiers, generation of parabolic pulses, etc.

Example 2 with RP Fiber Power: Regenerative Amplifier

The following screen shot shows another example for custom form, made for calculations on regenerative amplifiers. This form is also provided with the software as a demo file. It makes extensive use of tab controls, allowing one to enter quite some number of inputs data and see output data on a limited space on the screen.

custom form for a regenerative amplifier

Example 3 with RP Resonator: Focusing of a Laser Beam

The following screenshot shows a simple form for calculating the propagation of a laser beam through one or two lenses:

custom form for single-pass beam propagation

One simply enters the initial beam parameters, the focal lengths of the two lenses and their positions, and the software calculates the evolution of beam radius. It can even show the beam graphically, using the nice feature that images can be displayed where the color of each pixel is determined by a mathematical expression – in this case, using the Gaussian intensity profile with a z-dependent value of the beam radius.

Example 4 with RP Resonator: Bow-tie Ring Resonator

This examples concerns a bow-tie ring resonator:

custom form for a ring resonator

Here, a background image is used, and the input fields are positioned such that the user immediately sees to which arm length or angle some input corresponds.

Example 5 with RP Coating: Bragg Mirror

This example concerns the design of Bragg mirrors with the software RP Coating.

custom for a Bragg mirror

Here, you can choose to optical materials and enter parameters like the Bragg wavelength and number of layer pairs. You can produce different diagrams, for example showing the reflectivity profile for different angles of incidence.

Nice Features of Custom Forms

Custom forms can have many very handy features, some of which are listed in the following:

  • All input and output values can be nicely formatted, e.g. rounded to some number of valid digits and with proper units. For example, the user may simply enter “1.53u” into an input field for an optical wavelength, and the software will turn that into “1530 nm”.
  • Input fields can be made such that all outputs will be immediately recalculated when such an input is modified.
  • There are certain function keys with which you can ramp values up and down with different step sizes.
  • Multiple fields can grouped into a box with a border and some heading text, or into tab control containing multiple tabs. (For example, the screen shot above contains the tabs “Gain medium”, “Pump and signal” and “Resonator”.) In that way, you can have a lot of input fields without occupying too much space on the form. (You may even have nested tab controls, multiple boxes within a tab control, etc.) However, you can also just make a very long form, and the software will provide a scrollbar for accessing all parts of it.
  • For inputs, there are not only the usual text fields, but also combo boxes and radio buttons (for selecting values), track bars and check boxes.
  • Output fields can be text fields, but also one can have colored bars, where both the length and color of a bar can be calculated. For example, make a bar which graphically indicates what percentage of pump power is converted to signal power, or which turns from green to orange or red once the fiber might get overheated.
  • For text fields, the text color and the background color can be calculated. For example, you can change the color of a text field as soon as some value exceeds a certain limit.
  • It is possible to display images (loaded from files) in a form – for example, as background images or for illustrating certain input fields. Alternatively, the image content can be calculated, using a mathematical expression which defines the color for each pair of x and y coordinates.
  • One can create buttons with which additional functions can be accessed, e.g. saving some results to a file.
  • It is possible to save multiple input data sets into files and load them back into the form later on. So you may easily switch between parameter sets for different fiber amplifiers, for example, while still using a single script defining the form.
  • In versions made since 2017, you can use arbitrary Unicode characters in custom forms; they will be properly displayed and always so why if saving to a file and loading it back again.

Due to such features, it is a real fun to work with this software!

Also keep in mind that custom forms are in no way limited to some specific set of calculations. The script language supported by our software is extremely powerful and allows you to implement basically any calculations. So you may start using such custom forms even for calculations totally outside the technical context of this software or even outside the area of physics.

arrow