Resolve "Implement method for power results"
Closes #34 (closed)
getPower(self, resultType: str, excPort: int, excMode: int=0, runID: int=0)
Input parameters
powerType
String indicating the power result that must be retrieved. Possible values:
- "Accepted"
- "Outgoing all Ports"
- "Radiated"
- "Stimulated"
excPort
Excitation port. Used to generate the string with the result tree item that will be retrieved.
Must be equal or greater than 1.
excMode
Excitation mode. Used to generate the string with the result tree item that will be retrieved. To be used if and only if at least one of the ports of the project presents several modes. Otherwise, set it to 0 so that the routine in charge of generating the string with the result tree item knows that there is not a mode number to be included.
Must be equal or greater than 0.
runID
As it has been done with the getSParameters() method, it should be allowed to specify a runID for which the power result is retrieved. The method will retrieve a list of all the resultIDs and then index it using the value of runID to retrieve the adequate resultID.
A runID of 0 indicates the last run.