This section contains a list of public PyPO methods which are used for performing ray trace related tasks.
More...
Functions | |
| def | PyPO.System.System.removeFrame (self, str frameName) |
| Remove a ray-trace frame from system. More... | |
| def | PyPO.System.System.createTubeFrame (self, dict argDict) |
| Create a tube of rays from a TubeRTDict. More... | |
| def | PyPO.System.System.createGRTFrame (self, dict argDict) |
| Create a Gaussian beam distribution of rays from a GRTDict. More... | |
| list[np.ndarray] | PyPO.System.System.calcRayLen (self, *str frames, np.ndarray start=None) |
| Calculate total length of a ray-trace beam. More... | |
| def | PyPO.System.System.runRayTracer (self, dict runRTDict) |
| Run a ray-trace propagation from a frame to a surface. More... | |
| np.ndarray | PyPO.System.System.calcRTcenter (self, str name_frame) |
| Calculate the geometric center of a ray-trace frame. More... | |
| np.ndarray | PyPO.System.System.calcRTtilt (self, str name_frame) |
| Calculate the mean direction normal of a ray-trace frame. More... | |
| float | PyPO.System.System.calcSpotRMS (self, str name_frame) |
| Calculate the RMS spot size of a ray-trace frame. More... | |
| np.ndarray | PyPO.System.System.findRTfocus (self, str name_frame, float f0=None, float tol=1e-12) |
| Find the focus of a ray-trace frame. More... | |
This section contains a list of public PyPO methods which are used for performing ray trace related tasks.
| list[np.ndarray] PyPO.System.System.calcRayLen | ( | self, | |
| *str | frames, | ||
| np.ndarray | 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. |
| np.ndarray PyPO.System.System.calcRTcenter | ( | self, | |
| str | 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. |
| np.ndarray PyPO.System.System.calcRTtilt | ( | self, | |
| str | 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. |
| float PyPO.System.System.calcSpotRMS | ( | self, | |
| str | 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. |
| def PyPO.System.System.createGRTFrame | ( | self, | |
| dict | 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. |
| def PyPO.System.System.createTubeFrame | ( | self, | |
| dict | 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. |
| np.ndarray PyPO.System.System.findRTfocus | ( | self, | |
| str | name_frame, | ||
| float | f0 = None, |
||
| float | 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. |
| def PyPO.System.System.removeFrame | ( | self, | |
| str | 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. |
| def PyPO.System.System.runRayTracer | ( | self, | |
| dict | 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. |