PyPO User Manual
 
Loading...
Searching...
No Matches
Reflector Methods

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.
 

Detailed Description

This section contains a list of public PyPO methods concerning making/moving/deleting elements and groups.

Function Documentation

◆ addEllipse()

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.

Parameters
reflDictA filled reflectordictionary. Will raise an exception if not properly filled.

◆ addHyperbola()

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.

Parameters
reflDictA filled reflectordictionary. Will raise an exception if not properly filled.

◆ addParabola()

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.

Parameters
reflDictA filled reflectordictionary. Will raise an exception if not properly filled.

◆ addPlane()

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.

Parameters
reflDictA filled reflectordictionary. Will raise an exception if not properly filled.

◆ copyElement()

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.

◆ copyGroup()

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.

◆ deleteSnap()

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.

Parameters
nameName of object.
snap_nameName of snapshot to delete.
objWhether object is an element or a group.

◆ generateGrids()

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.

Parameters
nameName of reflector to be gridded.
transformApply internal transformation matrix to reflector.
sphericReturn spheric or square far-field grid (far-field only).
Returns
grids A reflGrids object containing the grids, area and normals.
See also
reflGrids

◆ groupElements()

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.

Parameters
namesNames of elements to put in group.
name_groupName of the group.
posPosition tracker for the group.
oriOrientation tracker for group.

◆ homeReflector()

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.

Parameters
nameReflector name or list of reflector or group to be homed.
objType of object to be homed.
transHome (translate) back to home position.
rotHome (rotate) back to home orientation.

◆ removeElement()

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.

◆ removeGroup()

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.

Parameters
name_groupName of the group to be removed.

◆ revertToSnap()

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.

Parameters
nameName of obj to revert.
snap_nameName of snapshot to revert to.
objWhether object is an element, group or frame.

◆ snapObj()

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.

Parameters
nameName of object to be snapped.
snap_nameName of snapshot to save.
objWhether object is an element, group or frame.