finesse.detectors.math_detector.MathDetector

Overview

class finesse.detectors.math_detector.MathDetector(name, expression)[source]

Bases: Detector

A detector that performs some math operation and outputs the result.

Parameters:
namestr

Name of detector

expressionSymbol

Symbolic expression to evaluate as the detectors output

Examples

KatScript example:

l l1 P=1 pd P l1.p1.o fd E l1.p1.o f=l1.f bp qx l1.p1.o q x modes(maxtem=3) gauss g1 l1.p1.o w0=1m z=0

mathd Y1 P*2 mathd Y2 P**2 mathd Y3 cos(1+P**2) mathd Y4 E*2 mathd Y5 qx+1

Properties

MathDetector.needs_fields

Flag indicating whether the detector requires light fields (i.e.

MathDetector.needs_trace

Flag indicating whether the detector requires beam traces.