finesse.model.Model¶
Overview
- class finesse.model.Model[source]¶
 Bases:
FreezableOptical configuration class for handling models of interferometers.
This class stores the interferometer configuration as a directed graph and contains methods to interface with this data structure.
Properties
Number of higher-order modes (HOMs) included in the model.  | 
|
Returns a generator of all the parameters in this model and the elements added to this model.  | 
|
The root action to apply to the model when   | 
|
The cavities stored in the model as a tuple object.  | 
|
The components stored in the model as a tuple object.  | 
|
The detectors stored in the model as a tuple object.  | 
|
Dictionary of all the model elements with the keys as their names.  | 
|
The default frequency to use for the model.  | 
|
The frequencies stored in the model as a   | 
|
A dictionary of optical node to   | 
|
Labels for the HOMs present in this model.  | 
|
An array of higher-order modes (HOMs) included in the model.  | 
|
The DC input matrix is used to relate degrees of freedoms and readouts within a model.  | 
|
Flag indicating whether the model has been built.  | 
|
Flag indicating whether the model is modal or plane-wave.  | 
|
Flag indicating whether the model has been traced.  | 
|
The default wavenumber used for the model.  | 
|
The default wavelength to use for the model.  | 
|
An instance of   | 
|
An ordered dictionary where the key type is the modes in the model and the mapped type is the index of the mode.  | 
|
The directed graph object containing the optical configuration as a   | 
|
A read-only view of the directed graph object stored by   | 
|
The optical nodes stored in the model.  | 
|
Returns any parameters added to this model, see also   | 
|
An integer corresponding to the phase level given to the phase command of a Finesse 2 kat script.  | 
|
Returns all readouts in the model.  | 
|
The signal nodes stored in the model.  | 
|
Filtered dictionary of   | 
|
Dictionary corresponding to beam tracing configuration options for simulations.  | 
|
The   | 
|
A list of beam tracing dependencies, ordered by their tracing priority.  | 
|
A convenience property to retrieve a list of the names of each   | 
Methods
Constructs a new instance of Freezable and freezes it.  | 
|
  | 
|
  | 
|
  | 
Adds an element (or sequence of elements) to the model - these can be   | 
  | 
Adds amplitude detectors at the specified node and frequency f for all Higher Order Modes in the model.  | 
  | 
Adds a FieldDetector at every optical node in model at a given frequency The name of each FieldDetector is automatically generated using the following pattern:   | 
  | 
Add a specific optical carrier frequency to the model description.  | 
  | 
Adds a   | 
  | 
Adds a new parameter to the Model.  | 
  | 
Performs a full beam trace on the model, calculating the beam parameters at each optical node.  | 
  | 
Context manager for making a simulation to work with.  | 
  | 
|
  | 
Prints the mismatches between each cavity in an easily readable table format.  | 
  | 
Utility function for connecting multiple connectable objects in a sequential list together.  | 
  | 
Retrieves a tree containing the network representing the components connected to the specified root.  | 
  | 
Calculate the Gouy phases accumulated over each space.  | 
  | 
Connects two ports in a model together.  | 
  | 
Sets the beam parameters such that a mismatch of the specified percentage magnitude (in terms of \(w_0\) and \(z\)) exists at the given node.  | 
  | 
Detect the mode mismatches in the model.  | 
  | 
Disconnects two elements A and B.  | 
  | 
Displays a block diagram of the signal paths in this model.  | 
  | 
Get the order in which element was added to the model.  | 
  | 
Get an attribute of the model using a string path representation like l1.p1.o.q.  | 
Returns the electrical and mechanical nodes that are active in a model, i.e. ones that need to be solved for because:.  | 
|
  | 
|
  | 
Returns an element in this model that matches the requested value.  | 
  | 
Returns a set of elements that element is connected to.  | 
  | 
Extracts elements of a specific type from this model.  | 
  | 
|
  | 
Get specified network.  | 
Return all optical ports that are not connected to a space.  | 
|
  | 
Get all or a filtered list of parameters from all elements in the model.  | 
  | 
Inserts the mode indices in modes into the   | 
  | 
Get string containing information about this model.  | 
  | 
Connect multiple components together in one quick command.  | 
  | 
Merges the model other with this model using a connection at the specified ports.  | 
  | 
Prints the mismatches computed by   | 
  | 
Select the HOM indices to include in the model.  | 
  | 
Parses kat script and adds the resulting objects to the model.  | 
  | 
Parses kat script from a file and adds the resulting objects to the model.  | 
  | 
Parses legacy (Finesse 2) kat script and adds the resulting objects to the model.  | 
  | 
Parses legacy (Finesse 2) kat script from a file and adds the resulting objects to the model.  | 
  | 
Retrieves an ordered container of the path trace between the specified nodes.  | 
  | 
Coupling coefficient and Gouy phase scaling:  | 
  | 
Plot the node network.  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Removes an object from the model.  | 
  | 
Removes the mode indices in modes from the   | 
Resets the simulation beam tracing configuration dict, given by   | 
|
  | 
Runs the current analysis set for this model.  | 
  | 
Save the model to a file.  | 
  | 
Set an attribute of the model using a string path representation like l1.p1.o.q.  | 
  | 
Change the   | 
  | 
Sort the display order of the elements in the model.  | 
  | 
Prints the space Gouy phases, as computed by   | 
  | 
Obtains a subgraph of the complete configuration graph between the two specified nodes.  | 
Turns off HOMs, switching the model to a plane wave basis.  | 
|
  | 
Tag a node with a unique name.  | 
  | 
Context manager that lets user change any ModelParameter then return it to the original value once completed.  | 
  | 
Generate an undirected graph containing components as the nodes of the graph and connections (spaces, wires) between component nodes as the edges of the graph.  | 
If a model has been built then this function undoes the process so the model can be changed and rebuilt if required.  | 
|
  | 
Serialise the model to kat script.  | 
  | 
Serialise the model to kat script in a file.  | 
  | 
Update the value of a manual beam parameter (i.e.  |