Package theia :: Package running :: Module simulation :: Class Simulation
[hide private]
[frames] | no frames]

Class Simulation

source code




Simulation class.

This class is a wrapper for all the metadata (names of setup and of files,
etc.) as well as for the high level functions of a simulation.

*=== Attributes ===*
LName: name of the simulation [string]
FName: name of the file for outputs (without extension) [string]
OptList: list of optical components of the setup [list of optics]
InBeams: list of input beams [list of beams]
BeamTreeList: list of binary trees of beams [list of BeamTree]
Order: order of the simulation, beams transmitted by HRs or reflected by ARs
    have their orders augmented by 1, and simulation calculates only until
    this Order attribute. [int]
Threshold: Power under which beams are no longer traced. [float]
Date: string of the date-time when the simulation was created (not run).
    [string]

Instance Methods [hide private]
 
__init__(self, FName='simulationinput')
Simulation initializer.
source code
 
__str__(self)
String representation of the simulation, for print(simulation).
source code
 
numberOfOptics(self)
Calculate the number of optics of OptList.
source code
 
load(self)
Initialize simulation attributes by input from .tia file.
source code
 
run(self)
Run simulation with input as read by load.
source code
 
writeOut(self)
Write the results from the simulation in the .out file.
source code
 
writeCAD(self)
Write the CAD .fcstd file by calling rendering functions.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, FName='simulationinput')
(Constructor)

source code 

Simulation initializer.

FName: output files name without extension. [string]

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

String representation of the simulation, for print(simulation).

Overrides: object.__str__

numberOfOptics(self)

source code 

Calculate the number of optics of OptList.

Returns the number of optics (not components, optics).

load(self)

source code 

Initialize simulation attributes by input from .tia file.

See documantation for the format of the input file.

No return value.

run(self)

source code 
Run simulation with input as read by load.

threshold: power of beam below which the simulation stops tracing child
            beams. [float]
order: maximum order to keep daughter beams. [integer]

No return value.