finesse.tracing.ctracer.TraceTree

Overview

class finesse.tracing.ctracer.TraceTree(node, dependency)

Bases: object

A binary tree data structure representing all the beam tracing paths from some root optical node of a model.

Each instance of this class has a left and right sub-tree (of the class type) and a parent tree. These linked tree attributes can be None. If the tree has a left / right sub-tree then the memoryviews left_abcd_x, left_abcd_y etc. will be initialised from the numerical ABCD matrix from the tree’s optical node to the next tree’s optical node.

Every sub-tree has a dependency attribute which is the object that the trace tree depends on - either a Cavity or a Gauss instance.

Methods

TraceTree.__init__(*args, **kwargs)

TraceTree.add_left(self, TraceTree sub_tree)

Add a left sub-tree to the tree.

TraceTree.add_right(self, TraceTree sub_tree)

Add a right sub-tree to the tree.

TraceTree.contains_comp(self, comp)

TraceTree.contains_node(self, node)

TraceTree.contains_space(self, space)

TraceTree.draw(self, unicode left_pad=u)

TraceTree.find_tree_at_node(self, node, ...)

TraceTree.from_cavity(type cls, cavity)

Construct a TraceTree from a cavity instance.

TraceTree.from_node(type cls, node, ...[, ...])

Construct a TraceTree from an optical node root.

TraceTree.from_path(list path)

Construct a TraceTree from a list of optical nodes.

TraceTree.get_last_input_nodes(self)

TraceTree.get_mirror_reflection_couplings(self)

TraceTree.is_changing(self, bool recursive=True)

TraceTree.remove_left(self)

TraceTree.remove_right(self)

TraceTree.trace_beam(self, dict trace, ...)

Trace the beam through the tree, placing the beam parameter entries at each node in the trace dict.