PyPO User Manual
 
Loading...
Searching...
No Matches
Common Transformation Methods

This section contains a list of public PyPO methods which are used for rotating and translating reflectors, groups and frame objects. More...

Functions

 PyPO.System.System.rotateGrids (self, name, rotation, obj="element", mode="relative", pivot=None, keep_pol=False)
 Rotate reflector grids.
 
 PyPO.System.System.translateGrids (self, name, translation, obj="element", mode="relative")
 Translate reflector grids.
 

Detailed Description

This section contains a list of public PyPO methods which are used for rotating and translating reflectors, groups and frame objects.

Function Documentation

◆ rotateGrids()

PyPO.System.System.rotateGrids ( self,
name,
rotation,
obj = "element",
mode = "relative",
pivot = None,
keep_pol = False )

Rotate reflector grids.

Apply a rotation, around a center of rotation, to a reflector, group or frame. Note that an absolute orientation rotates the orientation such that it is oriented w.r.t. the z-axis. In this case, the pivot defaults to the origin and not to the specified pivot. In the case that a PO field and/or a PO current is associated with the reflector, the polarisation of the field and/or current is rotated along as well. This can be disabled by setting the "keep_pol" parameter to "True".

Parameters
nameReflector name or list of reflector names.
rotationNumpy ndarray of length 3, containing rotation angles around x, y and z axes, in degrees.
objWhether the name corresponds to a single element or group.
modeApply rotation relative ('relative') to current orientation, or rotate to specified orientation ('absolute').
pivotNumpy ndarray of length 3, containing pivot x, y and z co-ordinates, in mm. Defaults to pos.
keep_polKeep polarisation of a field/current defined on the surface, if present.

◆ translateGrids()

PyPO.System.System.translateGrids ( self,
name,
translation,
obj = "element",
mode = "relative" )

Translate reflector grids.

Apply a translation to a reflector, group or frame. If the translation is absolute, the object will be translated such that its internal position parameter coincides with the specified translation.

Parameters
nameReflector name or list of reflector names.
translationNumpy ndarray of length 3, containing translation x, y and z co-ordinates, in mm.
objWhether the name corresponds to a single element or group.
modeApply translation relative ('relative') to current position, or move to specified position ('absolute').