This section contains a list of public PyPO
methods which are used for handling input/output with PyPO
systems.
More...
Functions | |
PyPO.System.System.getSystemLogger (self) | |
Obtain a reference to the custom logger used by system. | |
PyPO.System.System.setCustomBeamPath (self, path, append=False) | |
Set path to folder containing custom beam patterns. | |
PyPO.System.System.setSavePath (self, path, append=False) | |
Set path to folder were to save output plots. | |
PyPO.System.System.setSavePathSystems (self, path, append=False) | |
Set path to folder were to save systems. | |
PyPO.System.System.setLoggingVerbosity (self, verbose=True, handler=None) | |
Set the verbosity of the logging from within the system. | |
PyPO.System.System.setOverride (self, override=True) | |
Set the override toggle. | |
PyPO.System.System.saveSystem (self, name) | |
Save a system object to disk. | |
PyPO.System.System.loadSystem (self, name) | |
Load a system object from the savePathSystems path. | |
PyPO.System.System.mergeSystem (self, *systems) | |
Merge multiple systems together into current system. | |
This section contains a list of public PyPO
methods which are used for handling input/output with PyPO
systems.
PyPO.System.System.getSystemLogger | ( | self | ) |
Obtain a reference to the custom logger used by system.
This method can be called to obtain a reference to the logging object that PyPO uses internally. Can be convenient in cases one wants to log their own information in the layout of the PyPO logger.
PyPO.System.System.loadSystem | ( | self, | |
name ) |
Load a system object from the savePathSystems path.
This loads all reflectors, fields, currents and frames in the system from disk.
The system from which this method is called will be overwritten in its entirety, e.g. all reflectors, fields, currents and frames will be replaced with the internal dictionaries of the system to load. The directory from which the system will be saved will either be the current working directory or the directory specified with setSavePathSystems().
name | Load the system under this name. |
PyPO.System.System.mergeSystem | ( | self, | |
* | systems ) |
Merge multiple systems together into current system.
This method takes a arbitrary amount of system objects and updates the internal dictionaries of the system from which this method is called. This means that the calling system will keep its internal dictionaries. However, if the systems contain a key in the internal dictionaries matching a key in the calling system, this key and item will be overwritten.
systems | Systems to be merged into current system |
PyPO.System.System.saveSystem | ( | self, | |
name ) |
Save a system object to disk.
The system from which this method is called will be saved in its entirety, e.g. all reflectors, fields, currents and frames, to disk. The directory to which the system will be saved will either be the current working directory or the directory specified with setSavePathSystems().
name | Save the current system under this name. |
PyPO.System.System.setCustomBeamPath | ( | self, | |
path, | |||
append = False ) |
Set path to folder containing custom beam patterns.
Set the path to the directory where PyPO looks for custom beam patterns. When a custom beam pattern is imported using the readCustomBeam() method, PyPO will look in the specified path for the beam patterns.
path | Path to custom beams. |
append | Whether path is relative to current working directory or absolute from home. |
PyPO.System.System.setLoggingVerbosity | ( | self, | |
verbose = True, | |||
handler = None ) |
Set the verbosity of the logging from within the system.
Sometimes it is preferrable to not generate logging output to the console, for example when PyPO methods are called in for loops. This method allows for on/off switching of the logging unit so that the console is not flooded with logging messages.
verbose | Whether to enable logging or not. |
handler | If multiple handlers are present, select which handler to adjust. |
PyPO.System.System.setOverride | ( | self, | |
override = True ) |
Set the override toggle.
By setting "override" to False, PyPO will start appending number of occurences of a duplicate name instead of overwriting it.
override | Whether to override duplicate reflector names or not. |
PyPO.System.System.setSavePath | ( | self, | |
path, | |||
append = False ) |
Set path to folder were to save output plots.
Set the path to the directory where PyPO saves output plots.
path | Path to save directory. |
append | Whether path is relative to current working directory or absolute from home. |
PyPO.System.System.setSavePathSystems | ( | self, | |
path, | |||
append = False ) |
Set path to folder were to save systems.
Set the path to the directory where PyPO saves systems.
path | Path to save directory. |
append | Whether path is relative to current working directory or absolute from home. |