Lumerical’s scripting allows you to perform a wide range of mathematical operation on
You can perform simple algebraic operations (multiplication, division, addition, subtraction
Trigonometric and complex operations, sine, cosine, tangent, inverse sine, inverse cosine,
You can get the real and imaginary parts of a complex number, calculate its conjugate,
its absolute value, obtain its phase and, by using the unwrap function, remove the changes
of more than 2pi from the phase you got with the angle function.
Note that all the angles are expressed in radians in these functions.
You can also perform logarithmic operations (natural or base 10), exponential and square
The input of these functions can be complex or negative.
Note that when you use mathematical functions on arrays, you apply the function on each
element of the array.
Also, you can only do algebraic operations between arrays of the same dimensions.
If you would like to perform a matrix multiplication, you should use the “mult” function.
In the next unit, we will have a look at the logical operators.