finesse.detectors.field_detector.FieldDetector

Overview

class finesse.detectors.field_detector.FieldDetector(name, *args, **kwargs)[source]

Bases: Detector

Outputs an array of the higher order modes amplitudes at a particular node and frequency. The mode ordering is given by Model.homs. Plane wave models will output a single element array.

This detector can only be used on optical nodes.

Parameters
namestr

Name of newly created detector.

nodeNode

Node to read output from.

ffloat

Frequency of light to detect (in Hz).

Examples

>>> import finesse
>>> model = finesse.Model()
>>> model.parse('''
    laser l1
    gauss g1 l1.p1.o w0=1m z=0
    m m1 R=1 T=0 xbeta=1e-9 ybeta=3e-8
    link(l1, m1)
    modes(maxtem=1)
    fd fd1 m1.p1.o 0
''')
>>> out = model.run('noxaxis()')
>>> print(out['fd1'])
array([
    0.99999998+0.00000000e+00j,
    0+1.77157478e-04j,
    0+5.90524926e-06j
])