finesse.simulations.simulation.BaseSimulation

Overview

class finesse.simulations.simulation.BaseSimulation(model, unicode name, dict simulation_options)

Bases: object

This base level class should be inherited by others to perform the exact needs of a particular type of simulation. This BaseSimulation class contains the methods to store common settings as well as functionality for beam tracing through a model, and detecting which beam parameters will be changing. Developers should ensure that methods raising NotImplementedError are defined in any deriving classes.

Methods

BaseSimulation.__init__(*args, **kwargs)

BaseSimulation.build(self)

BaseSimulation.build_carrier_solver(self, ...)

BaseSimulation.build_signal_solver(self, ...)

BaseSimulation.generate_carrier_frequencies(self)

Returns a list of Frequency objects that the model has requested

BaseSimulation.generate_signal_frequencies(...)

Generates the optical, mechanical, and electrical frequencies that should be modelled by the signal simulation.

BaseSimulation.get_q(self, node)

Returns a tuple of (qx, qy) for a given node.

BaseSimulation.is_component_in_mismatch_couplings(...)

Determines whether the connector comp is associated with any of the node couplings in the stored changing mismatch couplings.

BaseSimulation.modal_update(self)

Updates HOM related dependencies / properties of the model.

BaseSimulation.post_build(self)

Post build calls functions that should be called after everything else has been built.

BaseSimulation.pre_build(self)

Pre-build performs some common setup routine that should be applicable to any deriving simulation class. This method performs the following tasks: * Checks if the signal frequency (fsig) is changing and if its value is None. If so, it sets a default value of 1 Hz. * Creates a list of all the changing parameters in the simulation. * Creates a set of tunable parameters from the changing parameters. * Determines if signal computation is required based on the value of fsig.f. Sets self.compute_signals * Determines if the simulation is modal or not. Sets self.is_modal * Initializes the model settings * Initializes the simulation configuration data. * Generates carrier frequencies based on the model. * Initializes the trace forest if the simulation is modal. * Determines the changing beam parameters if the simulation is modal.

BaseSimulation.run_carrier(self)

Runs the carrier matrix solver for the current state of the model.

BaseSimulation.run_signal(self[, solve_noises])

Runs the signal matrix solver for the current state.

BaseSimulation.setup_build(self)

BaseSimulation.setup_output_workspaces(self)

BaseSimulation.trace_beam(self)

Traces the beam through the paths which are dependent upon changing geometric parameter(s).

BaseSimulation.unbuild(self)

BaseSimulation.update_all_parameter_values(self)

Loops through all workspaces to update the C structs so they represent the current model element parameter values.

BaseSimulation.update_cavities(self)

BaseSimulation.update_map_data(self)

This will cycle through each map being used and if it is defined by a function it will be evaluated again.