finesse.analysis.actions.lti.FrequencyResponse2

Overview

class finesse.analysis.actions.lti.FrequencyResponse2(f, inputs, outputs, *, name='frequency_response2')[source]

Bases: Action

Computes the frequency response of a signal injceted at various nodes to compute transfer functions to multiple output nodes. Inputs and outputs should be electrical or mechanical nodes. It does this in an efficient way by using the same model and solving for multiple RHS input vectors.

This differs from FrequencyResponse in the way the inputs and outputs are prescribed. For FrequencyResponse2 you specify optical nodes, frequencies, and higher order modes to inject at arbitrary points.

This action does not alter the model state. This action will ignore any currently definied signal generator elements in the model.

Produces an output transfer matrix from each HOM at a particular frequency and optical node to some readout output. The shape of the output matrix is:

[frequencies, outputs, inputs, HOMs]

Parameters:
farray, double

Frequencies to compute the transfer functions over

inputsiterable[tuple[str or Node, Frequency]]

Optical node and frequency tuple to inject at

outputsiterable[str or Element]

Mechanical or electrical nodes to measure output at

namestr, optional

Solution name

Examples

>>> import finesse
>>> from finesse.analysis.actions import FrequencyResponse2
>>> model = finesse.script.parse('''
... l l1
... bs bs1 R=1 T=0 xbeta=1e-6 ybeta=1e-9
... readout_dc A
... link(l1, bs1, A)
... fsig(1)
... modes(maxtem=1)
... gauss g1 l1.p1.o w=1m Rc=inf
... ''')
>>> sol = model.run(
...     FrequencyResponse2(
...         [1, 10, 100],
...         [
...             ('bs1.p2.o', +model.fsig.f),
...             ('bs1.p2.o', -model.fsig.f)
...         ],
...         ['A.DC']
...     )
... )