finesse.locks.Lock

Overview

class finesse.locks.Lock(name, errsig, feedback_to, gain, accuracy, additive_fb=False, initial_only=False)[source]

A simple lock which computes and applies the feedback to a given parameter using an error signal.

Parameters

name : str

Name of newly created lock.

errsig : Any

An error signal parameter or an object capable of producing a real-type error signal. This is typically a demodulated finesse.detectors.PowerDetector instance (or the name of the instance).

feedback_to : finesse.element.Parameter

A parameter of the model to apply the locks’ feedback signal to.

gain : float

Control loop gain.

accuracy : float

Threshold to decide whether the loop is locked.

additive_fb : bool, optional

Adds the feedback signal to the initially set value of the feedback_to parameter. Defaults to false.

initial_only : bool, optional

The lock stops after the first data point so that only the initial lock is found and the rest is computed without locking. Defaults to false.

Properties

Lock.locked

Flag indicating whether this is locked.

Lock.initial_only

Flag for determining if this lock should only run for the first data point of a simulation.

Lock.error_signal

The error signal of the lock.

Lock.feedback_signal

The feedback signal computed by the lock.

Lock.feedback_param

A handle to the parameter which the feedback signal is applied to.

Lock.gain

Lock.accuracy

Methods

Lock.__init__(self, name)

Lock.reset(self)

Resets the lock, setting the Lock.locked flag to false.

Lock.run(self, index, lock_index)

Executes a single step of the locking loop for this Lock.