Parameter References & Equations

Finesse 3 has the ability to use both references to component parameters, and equations involving those parameters, as parameters themselves. This can lead to shorter, more intuitive files. To see what I mean, consider the following Finesse 2 example:

l L0 1 0 nlaser
s s1 0 nlaser nm
m1 m1 1 0 0 nm ncav1
s scav 5 ncav1 ncav2
m1 m2 0.5 0 0 ncav2 nout

set T1 m1 T
func T2 = $T1 * 0.5
put m2 T $T2
noplot T2

ad adTrans 0 nout

xaxis m1 T lin 0 1 100

Here a combination of set, func & put are used to make m2‘s transmissivity track that of m1, with noplot hiding the intermediate function from the plot. In Finesse 3, the equivalent would be:

l L0 P=1
s s1 L0.p1 m1.p1 L=0
m m1 T=1 L=0
s scav m1.p2 m2.p1 L=5
m m2 T=&m1.T*0.5 L=0

ad adTrans m2.p2.o f=0

xaxis m1.T lin 0 1 100

The whole set, func, put, noplot pattern from before has been replaced with the equivalent &m1.T*0.5. Here, &m1.T takes a reference to m1‘s transmissivity, and will be re-evaluated whenever m1.T changes.

These new features, along with many other changes, mean the Finesse 3 scripting language allow us to spend less time looking at a syntax reference (more time making interesting simulations!)

Leave a Reply