Package theia :: Package optics :: Module beam :: Class GaussianBeam
[hide private]
[frames] | no frames]

Class GaussianBeam

source code




GaussianBeam class.

This class represents general astigmatic Gaussian beams in 3D space.
These are the objects that are intended to interact with the optical
components during the ray tracing and that are rendered in 3D thanks to
FreeCAD.

*=== Attributes ===*
BeamCount: class attribute, counts beams. [integer]
Name: class attribute. [string]
QTens: general astigmatic complex curvature tensor at the origin.
    [np. array of complex]
N: Refraction index of the medium in which the beam is placed. [float]
Wl: Wave-length in vacuum of the beam (frequency never changes). [float]
P: Power of the beam. [float]
Pos: Position in 3D space of the origin of the beam. [3D vector]
Dir: Normalized direction in 3D space of the beam axis. [3D vector]
U: A tuple of unitary vectors which along with Dir form a direct orthonormal
    basis in which the Q tensor is expressed. [tuple of 3D vectors]
Ref: Reference to the beam. [string]
OptDist: Optical length. [float]
Length: Geometrical length of the beam. [float]
StrayOrder: Number representing the *strayness* of the beam. If the beams
    results from a transmission on a HR surface or a reflection on a AR
    surface, then its StrayOrder is the StrayOrder of the parent beam + 1.
    [integer]
Optic: Ref of optic where the beam departs from ('Laser' if laser). [string]
Face: Face of the optic where the beam departs from. [string]
TargetOptic: Ref of the optic where the beam terminates (None if open
    beam). [string]
TargetFace: Face of the target optic where the beam terminates. [string]
DWx: Distance of waist on X. [float]
DWy: Distance of waist on Y. [float]
Wx: Waist on X. [float]
Wy: Waist on Y. [float]
IWx: Width of beam on X at origin. [float]
IWy: Width of beam on Y at origin. [float]
TWx: Width of beam on X at target surface (None if open beam). [float]
TWy: Width of beam on Y at target surface (None if open beam).

Instance Methods [hide private]
 
__init__(self, Q, N, Wl, P, Pos, Dir, Ux, Uy, Ref, OptDist, Length, StrayOrder, Optic, Face)
Beam initializer.
source code
 
__str__(self)
String representation of the beam, when calling print(beam).
source code
 
lines(self)
Returns the list of lines necessary to print the object.
source code
 
Q(self, d=0.0)
Return the Q tensor at a distance d of origin.
source code
 
QParam(self, d=0.0)
Compute the complex parameters q1 and q2 and theta of beam.
source code
 
ROC(self, dist=0.0)
Return the tuple of ROC of the beam.
source code
 
waistPos(self)
Return the tuple of positions of the waists of the beam along Dir.
source code
 
rayleigh(self)
Return the tuple of Rayleigh ranges of the beam.
source code
 
width(self, d=0.0)
Return the tuple of beam widths at distance d.
source code
 
waistSize(self)
Return a tuple with the waist sizes in x and y.
source code
 
gouy(self, d=0.0)
Return the tuple of Gouy phases.
source code
 
initGaussianData(self)
Writes the relevant DW, W, IW data with Q.
source code
 
translate(self, X=0.0, Y=0.0, Z=0.0)
Move the beam to (current position + (X, Y, Z)).
source code

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

Class Variables [hide private]
  BeamCount = 0
  Name = 'Beam'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, Q, N, Wl, P, Pos, Dir, Ux, Uy, Ref, OptDist, Length, StrayOrder, Optic, Face)
(Constructor)

source code 

Beam initializer.

This is the initializer used internally for beam creation, for user inputed beams, see function userGaussianBeam.

Returns a Gaussian beam with attributes as the parameters.

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

String representation of the beam, when calling print(beam).

Overrides: object.__str__

QParam(self, d=0.0)

source code 
Compute the complex parameters q1 and q2 and theta of beam.

What is implemented here is a straightforward calculation to extract
the q1, q2, and theta of the normal form of Q.

    Returns a tuple q1, q2, theta

initGaussianData(self)

source code 

Writes the relevant DW, W, IW data with Q.

Is called upon construction to write the data of waist position and size, initial widths once and for all.

translate(self, X=0.0, Y=0.0, Z=0.0)

source code 

Move the beam to (current position + (X, Y, Z)).

X, Y, Z: components of the translation vector.

No return value.