MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / _processNGspiceResult

Function _processNGspiceResult

SLiCAP/SLiCAPngspice.py:628–643  ·  view source on GitHub ↗
(cirFile, analysisType, traceType, postProc)

Source from the content-addressed store, hash-verified

626 print("NGspice command not found in the [command] section of '{}'.".format(ini.home_path + "SLiCAP.ini"))
627
628def _processNGspiceResult(cirFile, analysisType, traceType, postProc):
629 # Read the CSV file
630 traceDict = None
631 with open(ini.cir_path + cirFile + '.csv', 'r') as f:
632 lines = f.readlines()
633 analysisType = analysisType.upper()
634 if analysisType == 'DC' or analysisType == 'NOISE' or (analysisType == 'TRAN' and (postProc is None or postProc.split()[0].upper() == "FOURIER")):
635 traceDict = _makeDCTRNStraces(lines)
636 elif analysisType.upper() == 'AC' or analysisType == 'TRAN':
637 traceDict = _makeACtraces(lines, traceType)
638 elif analysisType == "OP":
639 traceDict = _makeOPtraces(lines)
640 else:
641 raise NotImplementedError()
642 remove(ini.cir_path + cirFile + '.csv')
643 return traceDict
644
645def _makeOPtraces(lines):
646 traceDict = {}

Callers 1

ngspice2tracesFunction · 0.85

Calls 3

_makeDCTRNStracesFunction · 0.85
_makeACtracesFunction · 0.85
_makeOPtracesFunction · 0.85

Tested by

no test coverage detected