This section contains a list of public PyPO
methods which are used for performing ray trace related tasks.
More...
Functions | |
PyPO.System.System.removeFrame (self, frameName) | |
Remove a ray-trace frame from system. | |
PyPO.System.System.createTubeFrame (self, argDict) | |
Create a tube of rays from a TubeRTDict. | |
PyPO.System.System.createGRTFrame (self, argDict) | |
Create a Gaussian beam distribution of rays from a GRTDict. | |
PyPO.System.System.calcRayLen (self, *frames, start=None) | |
Calculate total length of a ray-trace beam. | |
PyPO.System.System.runRayTracer (self, runRTDict) | |
Run a ray-trace propagation from a frame to a surface. | |
PyPO.System.System.calcRTcenter (self, name_frame) | |
Calculate the geometric center of a ray-trace frame. | |
PyPO.System.System.calcRTtilt (self, name_frame) | |
Calculate the mean direction normal of a ray-trace frame. | |
PyPO.System.System.calcSpotRMS (self, name_frame) | |
Calculate the RMS spot size of a ray-trace frame. | |
PyPO.System.System.findRTfocus (self, name_frame, f0=None, tol=1e-12) | |
Find the focus of a ray-trace frame. | |
This section contains a list of public PyPO
methods which are used for performing ray trace related tasks.
PyPO.System.System.calcRayLen | ( | self, | |
* | frames, | ||
start = None ) |
Calculate total length of a ray-trace beam.
Takes multiple frames and calculates the distance for each ray between frames. If the "start" parameter is set to a len-3 Numpy array, the ray length will also include the distance between the position of the ray in the first frame and the given starting point. This is useful in case the rays emanate from a single point which is not included as a frame in the internal dictionary.
frames | Frames between which to calculate total pathlength. |
start | Point from which to start the calculation, len-3 Numpy array. If given, also calculates distance between point and the first frame. Defaults to None. |
PyPO.System.System.calcRTcenter | ( | self, | |
name_frame ) |
Calculate the geometric center of a ray-trace frame.
The center is calculated by finding the centroid of the given frame.
name_frame | Name of frame to calculate center of. |
PyPO.System.System.calcRTtilt | ( | self, | |
name_frame ) |
Calculate the mean direction normal of a ray-trace frame.
The mean direction is calculated by taking the mean tilt of every ray in the frame.
name_frame | Name of frame to calculate tilt of. |
PyPO.System.System.calcSpotRMS | ( | self, | |
name_frame ) |
Calculate the RMS spot size of a ray-trace frame.
The RMS spotsize is calculated by taking the root-mean-square of the positions of the rays in the frame.
name_frame | Name of frame to calculate RMS of. |
PyPO.System.System.createGRTFrame | ( | self, | |
argDict ) |
Create a Gaussian beam distribution of rays from a GRTDict.
The Gaussian frame will be placed in the internal frame dictionary. The frame is generated by rejection-sampling a Gaussian distribution in position and direction on an xy-grid. Position and orientation trackers for the frame are initialised to the origin and z-axis, respectively.
argDict | A GRTDict, filled. If not filled properly, will raise an exception. |
PyPO.System.System.createTubeFrame | ( | self, | |
argDict ) |
Create a tube of rays from a TubeRTDict.
The tube of rays will be placed in the internal frame dictionary. Position and orientation trackers for the frame are initialised to the origin and z-axis, respectively.
argDict | A TubeRTDict, filled. If not filled properly, will raise an exception. |
PyPO.System.System.findRTfocus | ( | self, | |
name_frame, | |||
f0 = None, | |||
tol = 1e-12 ) |
Find the focus of a ray-trace frame.
Adds a new plane to the System, perpendicular to the mean ray-trace tilt of the input frame. The new plane is called focal_plane_<name_frame> and stored in the internal system dictionary. After completion, the new plane is centered at the ray-trace focus. The focus frame is stored as focus_<name_frame> in the internal frames dictionary.
name_frame | Name of the input frame. |
f0 | Initial try for focal distance. |
verbose | Allow verbose System logging. |
PyPO.System.System.removeFrame | ( | self, | |
frameName ) |
Remove a ray-trace frame from system.
This method takes the name of an internally stored frame object and removes it from the internal dictionary.
frameName | Name of frame to be removed. |
PyPO.System.System.runRayTracer | ( | self, | |
runRTDict ) |
Run a ray-trace propagation from a frame to a surface.
The resulting frame is placed in the internal frames dictionary.
runRTDict | A runRTDict object specifying the ray-trace. |