finesse.detectors.workspace.DetectorWorkspace

Overview

class finesse.detectors.workspace.DetectorWorkspace(owner, sim, values=None, OutputInformation oinfo=None, *, bool needs_carrier=False, bool needs_signal=False, bool needs_noise=False, bool needs_modal_update=False, bool needs_simulation=True)

Bases: ElementWorkspace

A base class that all detector workspaces should inherit from. Provides a generic set of data needed to compute values and output them with metadata needed for storing the outputs.

Parameters:
ownerElement

Detector Element that owns this workspace and will be setting it up

simSimulation object

Simulation object this workspace should be associated with

values[object, BaseCValues], optional

The object containing the values that will be used by this workspace to calculate some output. These should match the parameters offered by the owner. A pure Python object can be used but will be slower to access. A BaseCValues object can also be used that offers cythonised access to parameter values

oinfoOutputInformation, optional

When provided this will set the output information of this detector, such as units, datatype, shape/dimension of outputs.

needs_carrierbool, optional

If the carrier simulation data is needed, this must be True

needs_signalbool, optional

If the signal simulation data (transfer functions) is needed, this must be True

needs_noisebool, optional

If this detector requires noise covariances to be calculated this must be True

needs_modal_update: bool, optional

If this detector outputs some modal or geometric property, this must be True.

Notes

The needs_* flags specify which simulations should be run to evaluate this workspace. At least one should be True, unless needs_simulation is flagged as False. This is to catch certain cases which mean the workspace will just not produce any output.

When adding new needs_* flag, ensure you update the MathDetector object to correctly fill these flags. The MathDetector essentially borrows workspaces from other detectors to compute its output and

Methods

DetectorWorkspace.__init__(*args, **kwargs)

DetectorWorkspace.get_output(self)

DetectorWorkspace.set_output_fn(self, callback)