Utilities

change
Change

Changes a model Parameter to some value during an analysis.

Syntax:
change(change_dict=none, relative=false, name='change', **kwargs)
Required:

\**kwargs: Alternative method to specify parameter:value pairs to change

Optional:

change_dict: Dictionary of parameter:value pairs to change.

relative: Whether to increment from the parameters current value or not

name: Name of action

dc_fields
DCFields

An action that saves the DC (carrier) fields at all nodes, frequencies, and higher order modes for the current state of the simulation.

Syntax:
dc_fields(name='dcfields')
Optional:

name: Name of the solution generated by this action

debug
Debug

An action that will start an IPython debug shell.

To access the current model use state.model.

Syntax:
debug(name='Debug')
maximize
Maximize

An action that maximizes some detector output by applying some feedback to multiple targets in a model. Extra keyword arguments are passed on to the Scipy method:

minimize This action offers a simplified interface that allows an optimization to be done during a simulation. By default the the Nelder-Mead optimization method is used but can be overridden. The user should read the Scipy documentation to determine which options should be used which are method dependant.

Syntax:
maximize(detector, parameter, *args, name='maximize', **kwargs)
Required:

detector: The name of the detector output to maximize / minimize.

parameter: The parameter or name of the parameter to optimize, or a tuple of parameters when using multiple targets to optimize over.

kwargs: Optional parameters passed to the Scipy optimisation routine as the options input. See Scipy method documentation to determine what is available.

Optional:

bounds: A pair of (lower, upper) bounds on the parameter value. Requires a method that uses bounds.

offset: An offset applied to the detector output when optimizing, defaults to 0.

kind: Either ‘max’ for maximization or ‘min’ for minimization, defaults to ‘max’.

max_iterations: Maximum number of solver iterations, defaults to 10000.

method: Optimisation method to use, see Scipy documentation for options.

name: The name of this action, defaults to ‘maximize’.

update_maps: If you are changing some parameter or variable that a Map depends on then setting this flag to True will recompute the Map data for each iteration of the optimiser.

pre_step: Action to run on each step of the optimisation.

See Also:

minimize

minimize
Minimize

An action that minimizes some detector output by applying some feedback to multiple targets in a model. Extra keyword arguments are passed on to the Scipy method:

minimize This action offers a simplified interface that allows an optimization to be done during a simulation. By default the the Nelder-Mead optimization method is used but can be overridden. The user should read the Scipy documentation to determine which options should be used which are method dependant.

Syntax:
minimize(detector, parameter, *args, name='minimize', **kwargs)
Required:

detector: The name of the detector output to maximize / minimize.

parameter: The parameter or name of the parameter to optimize, or a tuple of parameters when using multiple targets to optimize over.

kwargs: Optional parameters passed to the Scipy optimisation routine as the options input. See Scipy method documentation to determine what is available.

Optional:

bounds: A pair of (lower, upper) bounds on the parameter value. Requires a method that uses bounds.

offset: An offset applied to the detector output when optimizing, defaults to 0.

kind: Either ‘max’ for maximization or ‘min’ for minimization, defaults to ‘max’.

max_iterations: Maximum number of solver iterations, defaults to 10000.

method: Optimisation method to use, see Scipy documentation for options.

name: The name of this action, defaults to ‘maximize’.

update_maps: If you are changing some parameter or variable that a Map depends on then setting this flag to True will recompute the Map data for each iteration of the optimiser.

pre_step: Action to run on each step of the optimisation.

See Also:

maximize

noise_projection
NoiseProjection
Syntax:
noise_projection(f, *output_nodes, scaling=none, name='loop')
plot
Plot
Syntax:
plot(name=abcd)
print
Printer
Syntax:
print(*args, name='printer', eval=true)
print_model
PrintModel

An action that prints the model object being currently used to run actions.

Syntax:
print_model(name='print_model')
print_model_attr
PrintModelAttr

Prints an attribute of the model being currently used.

Syntax:
print_model_attr(*args, eval=true, prefix='')
Required:

\*args: Strings input for the attribute to print

Optional:

eval: When True symbolic expressions will be evaluated before printing. Defaults to True.

prefix: Optional string to print before the attributes

save_matrix
SaveMatrix

An action that will save the current state of the matrix being used by the simulation.

Not something that should be used lightly in loops or multiple times in a large simulation. Using this in something like a full LIGO model with many HOMs and sidebands will quickly fill up memory.

Syntax:
save_matrix(name='savematrix')