This section contains a list of public PyPO methods which are used for rotating and translating reflectors, groups and frame objects.
More...
Functions | |
| def | PyPO.System.System.rotateGrids (self, str name, np.ndarray rotation, Objects obj=Objects.ELEMENT, Modes mode=Modes.REL, np.ndarray pivot=None, bool keep_pol=False) |
| Rotate reflector grids. More... | |
| None | PyPO.System.System.translateGrids (self, str name, np.ndarray translation, Objects obj=Objects.ELEMENT, Modes mode=Modes.REL) |
| Translate reflector grids. More... | |
This section contains a list of public PyPO methods which are used for rotating and translating reflectors, groups and frame objects.
| def PyPO.System.System.rotateGrids | ( | self, | |
| str | name, | ||
| np.ndarray | rotation, | ||
| Objects | obj = Objects.ELEMENT, |
||
| Modes | mode = Modes.REL, |
||
| np.ndarray | pivot = None, |
||
| bool | 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".
| name | Reflector name or list of reflector names. |
| rotation | Numpy ndarray of length 3, containing rotation angles around x, y and z axes, in degrees. |
| obj | Whether the name corresponds to a single element, group, or frame. Fields and currents are translated by translating the associated surface. Choose from Objects enum. |
| mode | Apply rotation relative to current orientation (Modes.REL), or rotate to specified orientation (Modes.ABS). |
| pivot | Numpy ndarray of length 3, containing pivot x, y and z co-ordinates, in mm. Defaults to pos. |
| keep_pol | Keep polarisation of a field/current defined on the surface, if present. If True, does not rotate polarisation of any defined fields/currents along with the rotation of reflector. If False, rotates polarisation along with reflector. Defaults to False. |
| None PyPO.System.System.translateGrids | ( | self, | |
| str | name, | ||
| np.ndarray | translation, | ||
| Objects | obj = Objects.ELEMENT, |
||
| Modes | mode = Modes.REL |
||
| ) |
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.
| name | Reflector name or list of reflector names. |
| translation | Numpy ndarray of length 3, containing translation x, y and z co-ordinates, in mm. |
| obj | Whether the name corresponds to a single element, group, or frame. Fields and currents are translated by translating the associated surface. Choose from Objects enum. |
| mode | Apply translation relative ('relative') to current position, or move to specified position ('absolute'). |