Commit b5e1105d authored by Sean Leavey's avatar Sean Leavey
Browse files

Added properties to return a collection of mirrors, beam splitters and spaces...

Added properties to return a collection of mirrors, beam splitters and spaces as part of a kat object
parent 22c05c87
Pipeline #1648 failed with stage
in 0 seconds
......@@ -81,7 +81,7 @@ from collections import namedtuple, OrderedDict
from pykat.node_network import NodeNetwork
from pykat.detectors import BaseDetector as Detector
from pykat.components import Component
from pykat.components import Component, mirror, beamSplitter, space
from pykat.commands import Command, xaxis
from pykat.SIfloat import *
from pykat.param import Param, AttrParam
......@@ -809,6 +809,21 @@ class kat(object):
return tuple(items)
@property
def mirrors(self):
"""Returns a collection of the mirrors defined within the kat object."""
return self.getAll(mirror)
@property
def beamSplitters(self):
"""Returns a collection of the beam splitters defined within the kat object."""
return self.getAll(beamSplitter)
@property
def spaces(self):
"""Returns a collection of the spaces defined within the kat object."""
return self.getAll(space)
def __deepcopy__(self, memo):
"""
When deep copying a kat object we need to take into account
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment