This section contains a list of public PyPO
methods concerning making/moving/deleting elements and groups.
More...
Functions | |
PyPO.System.System.addParabola (self, reflDict) | |
Add a paraboloid reflector to the System. | |
PyPO.System.System.addHyperbola (self, reflDict) | |
Add a hyperboloid reflector to the System. | |
PyPO.System.System.addEllipse (self, reflDict) | |
Add an ellipsoid reflector to the System. | |
PyPO.System.System.addPlane (self, reflDict) | |
Add a planar surface to the System. | |
PyPO.System.System.homeReflector (self, name, obj="element", trans=True, rot=True) | |
Home a reflector or a group back into default configuration. | |
PyPO.System.System.snapObj (self, name, snap_name, obj="element") | |
Take and store snapshot of object's current configuration. | |
PyPO.System.System.revertToSnap (self, name, snap_name, obj="element") | |
Revert object configuration to a saved snapshot. | |
PyPO.System.System.deleteSnap (self, name, snap_name, obj="element") | |
Delete a saved snapshot belonging to an object. | |
PyPO.System.System.groupElements (self, name_group, *names, pos=None, ori=None) | |
Group elements together into a single block. | |
PyPO.System.System.removeGroup (self, name_group) | |
Remove a group of elements from system. | |
PyPO.System.System.generateGrids (self, name, transform=True, spheric=True) | |
Generate reflector grids and normals. | |
PyPO.System.System.removeElement (self, name) | |
Remove reflector from system. | |
PyPO.System.System.copyElement (self, name, name_copy) | |
Copy reflector. | |
PyPO.System.System.copyGroup (self, name, name_copy) | |
Copy group. | |
This section contains a list of public PyPO
methods concerning making/moving/deleting elements and groups.
PyPO.System.System.addEllipse | ( | self, | |
reflDict ) |
Add an ellipsoid reflector to the System.
This method takes a dictionary filled with the parameters for an ellipsoid reflector and generates an internal dictionary for generating the reflectorgrids.
reflDict | A filled reflectordictionary. Will raise an exception if not properly filled. |
PyPO.System.System.addHyperbola | ( | self, | |
reflDict ) |
Add a hyperboloid reflector to the System.
This method takes a dictionary filled with the parameters for a hyperboloid reflector and generates an internal dictionary for generating the reflectorgrids.
reflDict | A filled reflectordictionary. Will raise an exception if not properly filled. |
PyPO.System.System.addParabola | ( | self, | |
reflDict ) |
Add a paraboloid reflector to the System.
This method takes a dictionary filled with the parameters for a paraboloid reflector and generates an internal dictionary for generating the reflectorgrids.
reflDict | A filled reflectordictionary. Will raise an exception if not properly filled. |
PyPO.System.System.addPlane | ( | self, | |
reflDict ) |
Add a planar surface to the System.
This method takes a dictionary filled with the parameters for a planar reflector and generates an internal dictionary for generating the reflectorgrids.
reflDict | A filled reflectordictionary. Will raise an exception if not properly filled. |
PyPO.System.System.copyElement | ( | self, | |
name, | |||
name_copy ) |
Copy reflector.
This method takes an internal reflector dictionary and generates a deepcopy, i.e. a true copy. The copy can be adjusted safely without changing the contents of the original.
@ param name Name of reflector to be copied. @ param name_copy Name of new reflector.
PyPO.System.System.copyGroup | ( | self, | |
name, | |||
name_copy ) |
Copy group.
This method takes a group name and generates a deepcopy, i.e. a true copy. The copy can be adjusted safely without changing the contents of the original. Note however that the elements themselves are not deepcopied. This might change later on.
@ param name Name of group to be copied. @ param name_copy Name of new group.
PyPO.System.System.deleteSnap | ( | self, | |
name, | |||
snap_name, | |||
obj = "element" ) |
Delete a saved snapshot belonging to an object.
This deletes the stored snapshot, including the associated transformation matrix.
name | Name of object. |
snap_name | Name of snapshot to delete. |
obj | Whether object is an element or a group. |
PyPO.System.System.generateGrids | ( | self, | |
name, | |||
transform = True, | |||
spheric = True ) |
Generate reflector grids and normals.
Evaluate a stored reflector dictionary and return the x, y, z grids, area and normals. The outputs are grouped together in a grids object.
name | Name of reflector to be gridded. |
transform | Apply internal transformation matrix to reflector. |
spheric | Return spheric or square far-field grid (far-field only). |
PyPO.System.System.groupElements | ( | self, | |
name_group, | |||
* | names, | ||
pos = None, | |||
ori = None ) |
Group elements together into a single block.
After grouping, can translate, rotate and characterise as one.
This method adds a new field to the internal groups dictionary, with the key being the given name of the group. The item corresponding to this key is, again, a dictionary. The first key, "members", corresponds to a list containing the names of the reflectors added to the group. The position and orientation trackers of the group are set to the origin and the z-axis, respectively, if not passed as arguments.
names | Names of elements to put in group. |
name_group | Name of the group. |
pos | Position tracker for the group. |
ori | Orientation tracker for group. |
PyPO.System.System.homeReflector | ( | self, | |
name, | |||
obj = "element", | |||
trans = True, | |||
rot = True ) |
Home a reflector or a group back into default configuration.
Set internal transformation matrix of a reflector or group to identity.
name | Reflector name or list of reflector or group to be homed. |
obj | Type of object to be homed. |
trans | Home (translate) back to home position. |
rot | Home (rotate) back to home orientation. |
PyPO.System.System.removeElement | ( | self, | |
name ) |
Remove reflector from system.
This removes the key and corresponding reflector dictionary in the internal system dictionary. It also check whether the element is included in a group. If it is included in a group, the method will also remove the element from the "members" list of the group.
@ param name Name of reflector to be removed.
PyPO.System.System.removeGroup | ( | self, | |
name_group ) |
Remove a group of elements from system.
Note that this does not remove the elements inside the group.
Removing a group only removes the key and item in the internal groups dictionary and does not remove the contained elements.
name_group | Name of the group to be removed. |
PyPO.System.System.revertToSnap | ( | self, | |
name, | |||
snap_name, | |||
obj = "element" ) |
Revert object configuration to a saved snapshot.
Reverting an object to a snapshot replaces the internal transformation matrix with the matrix stored in the snapshot.
name | Name of obj to revert. |
snap_name | Name of snapshot to revert to. |
obj | Whether object is an element, group or frame. |
PyPO.System.System.snapObj | ( | self, | |
name, | |||
snap_name, | |||
obj = "element" ) |
Take and store snapshot of object's current configuration.
A snapshot consists of the transformation matrix of an element, group of frame.
name | Name of object to be snapped. |
snap_name | Name of snapshot to save. |
obj | Whether object is an element, group or frame. |