finesse.model.Model.get

Model.get(attr)[source]

Get an attribute of the model using a string path representation like l1.p1.o.q.

Examples

Parse a simple model and extract the laser power model parameter:

>>> import finesse
>>> kat = finesse.Model()
>>> kat.parse("""
... l l1 P=2
... s s1 l1.p1 m1.p1
... m m1 R=0.5 T=0.5
... pd Pr m1.p1
... pd Pt m1.p2
... """)
>>> kat.get("l1.P")
<l1.P=2.0 @ 0x11aa56588>