finesse.components.node.Port

Overview

class finesse.components.node.Port(name, component, node_type)[source]

Bases: Freezable

A collection of all the nodes at a specific point/surface of a component.

Parameters
namestr

Name of newly created node.

componentSub-class of Connector

The component that this node belongs to.

node_typeNodeType

Physical node type.

Properties

Port.attached_to

Components that this port is attached to.

Port.component

The component which has ownership of this port.

Port.enabled

Port.full_name

getter

Returns a full name of the port: {component name}.{port name}

Port.is_connected

Flag indicating whether the port is attached to another component.

Port.name

Name of the port object.

Port.nodes

Nodes associated with the port.

Port.refractive_index

If the port is an Optical port, this will return a symbolic value for the refractive index at this port.

Port.space

Space that the port is attached to.

Port.type

NodeType of the port object.

Methods

Port.__init__(name, component, node_type)

Constructs a new instance of Freezable and freezes it.

Port.get_unique_node(predicate)

Returns the unique node at this port that satisfies the provided predicate.

Port.node(name)

Get a node at this port by its name.