An instance of the Skirt class represents a particular SKIRT executable, and allows invoking it with given command line arguments for execution on the local host. More...
Public Member Functions | |
def | __init__ (self, path=None) |
The constructor accepts an optional argument specifying the file path to the SKIRT executable to be used. More... | |
def | execute (self, skiFilePath, *inDirPath="", outDirPath="", skiRelative=False, numThreadsPerProcess=0, numProcesses=1, verbose=False, wait=True, console='regular') |
This function invokes the SKIRT executable with the simulation and command line options corresponding to the values of the function arguments, as described below. More... | |
def | isRunning (self) |
This function returns True if the simulation started with the most recent call to the execute() function is still running, and False otherwise. More... | |
def | path (self) |
This function returns the absolute file path of the SKIRT executable used by this instance. More... | |
def | version (self) |
This function returns a string with version information on the SKIRT executable represented by this object. More... | |
Private Attributes | |
_path | |
_process | |
An instance of the Skirt class represents a particular SKIRT executable, and allows invoking it with given command line arguments for execution on the local host.
def pts.simulation.skirt.Skirt.__init__ | ( | self, | |
path = None |
|||
) |
The constructor accepts an optional argument specifying the file path to the SKIRT executable to be used.
If the path is specified, it should include the "skirt" filename of the executable. Otherwise the path is interpreted as described for the pts.utils.absPath() function. If the path is not specified, the constructor looks for a SKIRT executable in the project structure including this PTS source file, assuming that SKIRT is built under a ~/SKIRT9
or SKIRT
directory residing next to the PTS9 or PTS directory.
def pts.simulation.skirt.Skirt.execute | ( | self, | |
skiFilePath, | |||
* | inDirPath = "" , |
||
outDirPath = "" , |
|||
skiRelative = False , |
|||
numThreadsPerProcess = 0 , |
|||
numProcesses = 1 , |
|||
verbose = False , |
|||
wait = True , |
|||
console = 'regular' |
|||
) |
This function invokes the SKIRT executable with the simulation and command line options corresponding to the values of the function arguments, as described below.
The function returns a pts.simulation.simulation.Simulation instance corresponding to the simulation being performed (or attempted, in case of failure). The function supports asynchronous execution, allowing the caller to perform other tasks while the simulation is running.
True
, the simulation input/output directory paths are relative to the directory of the ski file being executed; if False
or missing, they are relative to the current directory.True
, each process creates its own complete log file. If missing or set to False, only the root process creates a full log file, and the other processes only create a log file when there are errors or warnings.True
or missing, the function waits until SKIRT execution completes; if False
the function returns immediately after launching SKIRT without waiting for it.True
or missing, the default logging mode is 'regular'. If wait is False
, the logging mode is always 'silent'. def pts.simulation.skirt.Skirt.isRunning | ( | self | ) |
This function returns True if the simulation started with the most recent call to the execute() function is still running, and False otherwise.
def pts.simulation.skirt.Skirt.path | ( | self | ) |
This function returns the absolute file path of the SKIRT executable used by this instance.
def pts.simulation.skirt.Skirt.version | ( | self | ) |
This function returns a string with version information on the SKIRT executable represented by this object.
The function invokes SKIRT with an incorrect command line argument to obtain this information.