Package theia :: Package optics :: Module ghost :: Class Ghost
[hide private]
[frames] | no frames]

Class Ghost

source code




Ghost class.

This class represents surfaces which don't interact with the beams. They
just transmit the same beam, and may be useful to monitor the beams on their
way, without having to calculate the Q yourself if you're looking for the
Q at another place than the origin of the beam.

Ghost surfaces basically have a null thickness and transmit the beams.

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

Nested Classes [hide private]

Inherited from component.SetupComponent: __metaclass__

Instance Methods [hide private]
 
__init__(self, X=0.0, Y=0.0, Z=0.0, Theta=1.57079632679, Phi=0.0, Ref=None, Diameter=0.5)
Ghost initializer.
source code
 
lines(self)
Return the list of lines needed to print the object.
source code
 
isHit(self, beam)
Determine if a beam hits the Ghost surface.
source code
 
hit(self, beam, order, threshold)
Return the beam simply transmitted by the ghost surface.
source code

Inherited from component.SetupComponent: __str__, translate

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

Class Variables [hide private]
  Name = 'Ghost'
  __abstractmethods__ = frozenset([])

Inherited from component.SetupComponent: SetupCount

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, X=0.0, Y=0.0, Z=0.0, Theta=1.57079632679, Phi=0.0, Ref=None, Diameter=0.5)
(Constructor)

source code 

Ghost initializer.

Parameters are the attributes.

Returns a Ghost.

Overrides: object.__init__

lines(self)

source code 

Return the list of lines needed to print the object.

Overrides: component.SetupComponent.lines

isHit(self, beam)

source code 
Determine if a beam hits the Ghost surface.

This uses the linePlaneInter function from the geometry module to find
characteristics of impact of beams on ghost surfaces.

beam: incoming beam. [GaussianBeam]

Returns a dictionary with keys:
    'isHit': whether the beam hits the dump. [boolean]
    'intersection point': point in space where it is first hit.
        [3D vector]
    'face': to indicate which face is first hit, can be 'HR', 'AR' or
        'side'. [string]
    'distance': geometrical distance from beam origin to impact. [float]

Overrides: component.SetupComponent.isHit

hit(self, beam, order, threshold)

source code 
Return the beam simply transmitted by the ghost surface.

beam: incident beam. [GaussianBeam]
order: maximum strayness of daughter beams, which are not returned if
    their strayness is over this order. [integer]
threshold: idem for the power of the daughter beams. [float]

Returns a dictionary of beams with keys:
    't': Gaussian beam which is the continuity of the incident beam.

Overrides: component.SetupComponent.hit