Creates a table or tables with results of pole/zero analysis stored in *resultObject*. If no label AND no caption are given this method returns a LaTeX tabular snippet. Else it returns a table snippet. :param resultObject: SLiCAP circuit object that comprises the ci
(self, resultObject, label="", caption="", color="myyellow")
| 303 | return Snippet(TEX, self.format) |
| 304 | |
| 305 | def pz(self, resultObject, label="", caption="", color="myyellow"): |
| 306 | """ |
| 307 | Creates a table or tables with results of pole/zero analysis stored in *resultObject*. |
| 308 | If no label AND no caption are given this method returns a LaTeX |
| 309 | tabular snippet. Else it returns a table snippet. |
| 310 | |
| 311 | :param resultObject: SLiCAP circuit object that comprises the circuit data to be listed. |
| 312 | :type resultObject: SLiCAP.SLiCAPinstruction.instruction |
| 313 | |
| 314 | :param label: Reference label for the table. Defaults to an empty string. |
| 315 | :type label: str |
| 316 | |
| 317 | :param caption: Text that will used as table caption(s). |
| 318 | :type caption: str |
| 319 | |
| 320 | :param color: Alternate row color name, should be defined in |
| 321 | 'preambuleSLiCAP.tex' defaults to 'myyellow'. Use None for |
| 322 | no background color. |
| 323 | :type color: str |
| 324 | |
| 325 | :return: SLiCAP Snippet object |
| 326 | :rtype: SLiCAP.SLiCAPprotos.Snippet |
| 327 | """ |
| 328 | if resultObject.errors != 0: |
| 329 | print("pz2TEX: Errors found in instruction.") |
| 330 | TEX = '' |
| 331 | elif resultObject.dataType != 'poles' and resultObject.dataType != 'zeros' and resultObject.dataType != 'pz': |
| 332 | print("pz2TEX: Error: 'pz2RST()' expected dataType: 'poles', 'zeros', or 'pz', got: '{0}'.".format(resultObject.dataType)) |
| 333 | TEX = '' |
| 334 | elif resultObject.step == True : |
| 335 | print("pz2TEX: Error: parameter stepping not implemented for 'pz2RST()'.") |
| 336 | TEX = '' |
| 337 | else: |
| 338 | TEX = '' |
| 339 | if len(resultObject.poles) != 0: |
| 340 | numericPoles = _checkNumeric(resultObject.poles) |
| 341 | else: |
| 342 | numericPoles = True |
| 343 | if len(resultObject.zeros) != 0: |
| 344 | numericZeros = _checkNumeric(resultObject.zeros) |
| 345 | else: |
| 346 | numericZeros = True |
| 347 | if numericPoles and numericZeros: |
| 348 | numeric = True |
| 349 | else: |
| 350 | numeric = False |
| 351 | if numeric: |
| 352 | alignstring = '[c]{lrrrrr}' |
| 353 | if ini.hz == True: |
| 354 | headerList = ['\\#', 'Re [Hz]', 'Im [Hz]', 'f [Hz]', 'Q'] |
| 355 | else: |
| 356 | headerList = ['\\#', 'Re [rad/s]', 'Im [rad/s]', '$\\omega$ [rad/s]', 'Q'] |
| 357 | else: |
| 358 | alignstring = '[c]{ll}' |
| 359 | if ini.hz == True: |
| 360 | headerList = ['\\#', 'f [Hz]'] |
| 361 | else: |
| 362 | headerList = ['\\#', '$\\omega$ [rad/s]'] |
nothing calls this directly
no test coverage detected