Creates a dictionary with values or traces from an ngspice run. :param cirFile: Name of the circuit file withouit '.cir' extension, located in the cir folder. :type cirFile: str :param simCmd: ngspice instruction, - ac dec 20 1 10meg
(cirFile, simCmd, namesDict, stepCmd=None, parList=None,
traceType='magPhase', squaredNoise=False, postProc=None,
saveLog=True, optDict=None, mode=None, timeout=None)
| 327 | |
| 328 | |
| 329 | def ngspice2traces(cirFile, simCmd, namesDict, stepCmd=None, parList=None, |
| 330 | traceType='magPhase', squaredNoise=False, postProc=None, |
| 331 | saveLog=True, optDict=None, mode=None, timeout=None): |
| 332 | """ |
| 333 | Creates a dictionary with values or traces from an ngspice run. |
| 334 | |
| 335 | :param cirFile: Name of the circuit file withouit '.cir' extension, located |
| 336 | in the cir folder. |
| 337 | |
| 338 | :type cirFile: str |
| 339 | |
| 340 | :param simCmd: ngspice instruction, |
| 341 | |
| 342 | - ac dec 20 1 10meg |
| 343 | - tran 1n 10u |
| 344 | - dc Source Vstart Vstop Vincr [ Source2 Vstart2 Vstop2 Vincr2 ] |
| 345 | - noise V(out) Vs dec 10 1 10meg 1 |
| 346 | - op |
| 347 | |
| 348 | :type simCmd: str |
| 349 | |
| 350 | :param stepCmd: Step instruction or None if no parameter stepping is performed: |
| 351 | |
| 352 | Syntax: *<parname> <stepmethod> <firstvalue> (<lastvalue> <numberofvalues | listwithvalues>)* |
| 353 | |
| 354 | - parname (*str*): name of the parameter (not a RefDes) |
| 355 | - stepmethod (*str*): lin, log or list |
| 356 | |
| 357 | :type stepCmd: str, nonetype |
| 358 | |
| 359 | :param namesDict: Dictionary with key-value pairs: |
| 360 | |
| 361 | key: plot label (*str*) |
| 362 | |
| 363 | value: nodal voltage, branch current or device parameter in ngspice notation |
| 364 | |
| 365 | :type namesDict: dict |
| 366 | |
| 367 | :param traceType: Type of traces for AC, noise, and FFT analysis: |
| 368 | |
| 369 | - realImag: real and imaginary parts |
| 370 | - magPhase: magnitude and phse |
| 371 | - dBmagPhase: dB(magnitude) and phase |
| 372 | - onoise: output referred noise |
| 373 | - inoise: input referred noise |
| 374 | |
| 375 | :type traceType: str |
| 376 | |
| 377 | :param parList: List with parameter definitions, each item in the list must |
| 378 | be a tuple with the name and the value of a parameter. The |
| 379 | name must be a string, and the value a string, an integer, |
| 380 | a float, or a SPICE expression (between curly brackets). |
| 381 | The order of parameter definitions should be such that |
| 382 | SPICE can evaluate a numeric value for each parameter in a |
| 383 | non-recursive way. |
| 384 | |
| 385 | :Example: |
| 386 |
no test coverage detected