Package theia :: Package optics :: Module component :: Class SetupComponent
[hide private]
[frames] | no frames]

Class SetupComponent

source code




SetupComponent class.

This is an Abstract Base Class for all the components (optical or not) of
the setup. Its methods may be implemented in daughter classes.

*=== Attributes ===*
SetupCount: class attribute, counts setup components. [integer]
HRCenter: center of the principal face of the component in space.
    [3D vector]
HRnorm: normal unitary vector the this principal face, supposed to point
    outside the media. [3D vector]
Thick: thickness of the component, counted in opposite direction to
    HRNorm. [float]
Dia: diameter of the component. [float]
Name: name of the component. [string]
Ref: reference string (for keeping track with the lab). [string]

Nested Classes [hide private]
  __metaclass__
Metaclass for defining Abstract Base Classes (ABCs).
Instance Methods [hide private]
 
__init__(self, HRCenter, HRNorm, Name, Ref, Thickness, Diameter)
SetupComponent initializer.
source code
 
__str__(self)
String representation of the component, when calling print(object).
source code
 
isHit(self, beam)
Method to determine if component is hit by a beam.
source code
 
lines(self)
Method to return the list of strings to __str__.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  SetupCount = 0
  __abstractmethods__ = frozenset(['isHit', 'lines'])
  _abc_cache = 'WeakSet'
  _abc_negative_cache = 'WeakSet'
  _abc_negative_cache_version = 28
  _abc_registry = 'WeakSet'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, HRCenter, HRNorm, Name, Ref, Thickness, Diameter)
(Constructor)

source code 

SetupComponent initializer.

Parameters are the attributes of the object to construct.

Returns a setupComponent.

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

String representation of the component, when calling print(object).

Overrides: object.__str__

isHit(self, beam)

source code 

Method to determine if component is hit by a beam.

Abstract (pure virtual) method.

Decorators:
  • @abstractmethod

lines(self)

source code 

Method to return the list of strings to __str__.

Abstract (pure virtual) method.

Decorators:
  • @abstractmethod