finesse.components.workspace module
- class finesse.components.workspace.ConnectionSetting(*values)[source]
Bases:
__Pyx_FlexibleEnumBase
- class finesse.components.workspace.Connections[source]
Bases:
objectThis is a container object for storing the connection submatrices defined by a component. This is used in the default case where no optimised C class is provided.
- class finesse.components.workspace.ConnectorCallbacks(*values)[source]
Bases:
__Pyx_FlexibleEnumBase
- class finesse.components.workspace.ConnectorMatrixSimulationInfo(connections=None, noise_sources=None)[source]
Bases:
object- add_fill_function(self, callback, bool refill)[source]
This adds a callback function that will be used by the model to fill the matrix elements. This can either be a Python function or cdef wrapped with FillFuncWrapper.
Parameters
- callbackCallable or FillFuncWrapper
Callback for fill function
- refillboolean
Flags that this fill function will need to be called multiple times during simulation to refill the simulation matrix
- callback_flag
- connection_settings
- connections
- noise_sources
- set_fill_noise_function(self, noise_type, callback)[source]
This sets the callback function that will be used by the model to fill the noise matrix elements. This can either be a Python function, which accepts a
- class finesse.components.workspace.ConnectorWorkspace(owner, sim, carrier_connections=None, signal_connections=None, values=None, noise_sources=None)[source]
Bases:
ABCDWorkspaceThis workspace represents the basic container for storing details for modelling Connector elements - those which form edges and nodes in a model.
- carrier
- input_noise
- output_noise
- signal
- class finesse.components.workspace.FillFuncWrapper[source]
Bases:
objectHelper class for wrapping a C fill function that can be referenced from Python by objects. This allows a direct C call to the function from other cdef functions.
Examples
Create a C function then wrap it using this class:
>>> cdef void c_fill(ConnectorWorkspace ptr_ws) noexcept: >>> cdef MirrorWorkspace ws = <MirrorWorkspace>ptr_ws >>> ... >>> >>> fill = FillFuncWrapper.make_from_ptr(c_fill)