The Application Modules¶
opsim
¶
Simple 2D simulation of optical components and more complicated optical assemblies using raytracing.
-
class
opsim.
MyApp
(redirect=False, filename=None, useBestVisual=False, clearSigInt=True)¶ Main application.
core.opsim_mainframe
¶
Main window of DOSSS.
-
class
core.opsim_mainframe.
MainFrame
(title, *args)¶ The main frame class derived from wx.Frame. This handles all user input.
core.opsim_objects
¶
Manages object import into DOSSS. All objects that were placed in the objects folder are automatically imported.
Important
Each object class has to be placed in its own module and the module file needs to have the same name as the class.
-
core.opsim_objects.
getNewObject
(identifier, posx, posy)¶ Create a new object.
Parameters: - identifier (str) – Name of the object as it appears in objectList.
- posx (float) – x-position of object.
- posy (float) – y-position of object.
Returns: Instance of the new object or None if object not found.
-
core.opsim_objects.
load_from_file
(filepath)¶ Dynamically load a python module and return an instance of the class with the same name as the file.
Parameters: filepath (str) – Name and path of the module to load. Returns: Instance of class with same name as module.
-
core.opsim_objects.
objectList
()¶ Returns a list with object names that can be used to create the menu items, for example.
-
core.opsim_objects.
parse_objects
()¶ Create a dictionary mapping all existing objects to their modules. This function is called once at the beginning.
core.opsim_property_dialog
¶
This dialog provides a standardized method for the user to enter multiple property values for an object.