Tuning

Tuning actions are used to tune a model and prepare it for locking with RunLocks. See also Locking actions for a demonstration of how these actions are used.

opt_rf_readout_phase
OptimiseRFReadoutPhaseDC

This optimises the demodulation phase of ReadoutRF elements relative to some DegreeOfFreedom or driven Parameter in the model. The phases are optimised by calculating the DC response of the readouts. This Action changes the state of the model by varying the readout demodulation phases. If no arguments are given it will try to automatically optimise any lock element in the model that is using an RF readout with respect to the lock feedback parameter.

Syntax:
opt_rf_readout_phase(
    *args,
    d_dof=1e-10,
    name='optimise_demod_phases_dc',
    verbose=false
)
Required:

args: Pairs of DegreeOfFreedom or Parameter and ReadoutRF elements, or pairs of their names. If none are provided OptimiseRFReadoutPhaseDC will automatically search for Lock elements which have ReadoutRF error signal and optimise them. Every readout can only be optimised to a single DegreeOfFreedom or Parameter. If a readout is paired with multiple drives, its phase is optimised to the first and the others are ignored.

verbose: If True this will print the initial and optimised readout phases. Defaults to False

Optional:

d_dof: A small offset applied to the DOFs to compute the gradients of the error signals

sensing_matrix_dc
SensingMatrixDC

Computes the sensing matrix elements for various degrees of freedom and readouts that should be present in the model. The solution object for this action then contains all the information on the sensing matrix. This can be plotted in polar coordinates, displayed in a table, or directly accessed.

The sensing gain is computed by calculating the gradient of each readout signal, which means it is a DC measurement. This will not include any suspension or radiation pressure effects. This action does not modify the states model.

Syntax:
sensing_matrix_dc(dofs, readouts, d_dof=1e-09, name='sensing_matrix_dc')
Required:

dofs: String names of degrees of freedom

readouts: String names of readouts

Optional:

d_dof: Small step used to compute derivative

set_lock_gains
SetLockGains

An action that computes the optimal lock gains using the sensing matrix found with SensingMatrixDC. This action computes the error signal gradient for each lock with respect to its drive and sets the gain as -gain_scale/sensing.

Syntax:
set_lock_gains(
    *locks,
    d_dof_gain=1e-10,
    gain_scale=1,
    name='set gains',
    verbose=false
)
Required:

name: Name of the action.

verbose: If True this will print the name of the enabled locks and their gains.

Optional:

\*locks: A list of locks for which to set the gain. If none provided, all enabled locks in model are used. Disabled locks that are explicitly listed will have their gains set.

d_dof_gain: Step size to use when calculating the gain for each error signal/DOF pair.

gain_scale: Extra gain scaling factor applied to the gain calculation: -gain_scale/sensing In multiple lock models where the locks are cross coupled using a gain_scale < 1 can improve the stability of the locking algorithm to stop excessively large steps.

See Also:

opt_rf_readout_phase, sensing_matrix_dc

get_error_signals
GetErrorSignals

An action that quickly calculates the current error signals for all or a subset of locks in a model.

Syntax:
get_error_signals(*locks, name='get error signals')
Required:

name: Name of the action.

Optional:

\*locks: A list of lock names to compute the error signals for. If not provided, all locks in model are used.

run_locks
RunLocks

An action that iteratively moves the system to lock. Currently, lock error signals must be readouts, not detectors, for use in this action.

Syntax:
run_locks(
    *locks,
    method='proportional',
    scale_factor=1,
    sensing_matrix=none,
    max_iterations=10000,
    display_progress=false,
    d_dof_phase=1e-09,
    d_dof_gain=1e-09,
    exception_on_fail=true,
    no_warning=false,
    pre_step=none,
    show_progress_bar=none,
    name='run locks'
)
Required:

method: Which method to use in the locking iterations.

scale_factor: Factor by which to multiply all DOF changes. Should be set below 1 if it is desired to minimize overshooting.

sensing_matrix: Sensing matrix of gains used in locking, of the type that would be returned by state.apply(SensingMatrixDC(lock_dof_names, readout_names) If None, the sensing matrix is recalculated. Recommended to be None except when locking multiple times in a row, e.g. with DragLocks.

max_iterations: The maximum number of locking steps in each execution of RunLocks.

display_progress: When true, displays the status of the error signals during locking iterations.

d_dof_phase: Step size to use when optimizing the demodulation phase for each error signal/DOF pair.

d_dof_gain: Step size to use when calculating the gain for every pair of error signals and DOFs.

exception_on_fail: When true, raise exception if maximum iterations are surpassed.

no_warning: When true, don’t even raise a warning if maximum iterations are reached. Recommended to be false unless repeatedly testing locking.

pre_step: Action to apply on each step of the lock

show_progress_bar: Will enable the progress bar when true.

name: Name of the action.

Optional:

\*locks: A list of locks to use in each RunLocks step. If not provided, all locks in model are used.

pseudo_lock_cavity
PseudoLockCavity

An action that locks a cavity defined by a Cavity element to a specific mode without using any radio-frequency sensing scheme. This will only work on simple cavities that are not coupled in any way. You can specify whether to try and lock to a particular HG mode with the mode=[n,m] keyword argument, or just pick the lowest loss mode, lowest_loss=True.

Syntax:
pseudo_lock_cavity(
    cavity,
    mode=none,
    lowest_loss=false,
    feedback=none,
    name='pseudo_lock_cavity'
)
Required:

cavity: Cavity element describing some Fabry-Perot like optical cavity

Optional:

mode: HG mode to try and lock to, default is [0,0]

lowest_loss: Select the eigenmode which has the lowest loss, most likely the fundamental mode of the cavity. Using lowest loss will override the mode selection.

feedback: If None the required cavity tuning to lock to the calculated mode will be determined from the cavity objects source node element, and the relevant phi parameter will be used. Alternatively you can specify which tuning parameter is used instead. Which should be a phi of some mirror in the cavity or a DegreeOfFreedom which controls the cavity length.

name: Name of the solution generated by this action

pseudo_lock_drfpmi
PseudoLockDRFPMI

Pseudo-locking is attempting to find an operating point for a LIGO like model without needing to use RF sidebands and readouts. Although it is not physically accurate it does provide a useful tool for analysing detectors from a more theoretical basis. This generates a PseudoLockDRFPMISolution solution containing various operators and results.

This action is hardcoded to work with a LIGO like model. Mirrors should be named with ITMX, ETMX, PRM, etc. This currently action only really works for finding the lock points for the PRC, SRC, XARM, and YARM – which all have defined cavity roundtrips which allow eigendecomposition of roundtrip operators. The eigenvectors describe the HOM mix for each resonant mode in a cavity and the eigenvalues the roundtrip phase and loss of the mode. This code looks for eigenvectors with the largest HG00 content and then uses the eigenvalues to compute what cavity tunings need to make this mode resonant. The corner is the most complicated here as the PRC and SRC are coupled via the beamsplitter. The eigendecomposition is performed on the 2x2 operator matrix for the PRC, SRC, and the coupling matrices between them. When the coupling is small the results are the same as performing the decomposition on each SRC and PRC separately. Note that the only degree of freedom that this does not handle currently is MICH. MICH is awkward because it is not a cavity. It is essentially the beamsplitter position that makes the anti-symmetric port dark.

Syntax:
pseudo_lock_drfpmi(frequency=0, apply_tunings=true, name='operator_lock')
Optional:

frequency: Frequency to use for calculating the operators

apply_tunings: When True the action will modify the model tunings

name: Name of the solution generated by this action