summaryrefslogtreecommitdiff
path: root/src/ngspiceSimulation
diff options
context:
space:
mode:
authorxoher2015-07-28 02:49:57 +0530
committerxoher2015-07-28 02:49:57 +0530
commitd9482c3c0bcb33162aeef55a3a2b79e606c02aa3 (patch)
treebc6e791f0b55d09002146afbe0bee1700a25f8f1 /src/ngspiceSimulation
parent034bc2734d017f3bdc94a309102b3141cb623ce9 (diff)
downloadeSim-d9482c3c0bcb33162aeef55a3a2b79e606c02aa3.tar.gz
eSim-d9482c3c0bcb33162aeef55a3a2b79e606c02aa3.tar.bz2
eSim-d9482c3c0bcb33162aeef55a3a2b79e606c02aa3.zip
Kicad to NgSpice conversion opens in dock area
Diffstat (limited to 'src/ngspiceSimulation')
-rw-r--r--src/ngspiceSimulation/NgspiceWidget.py2
-rw-r--r--src/ngspiceSimulation/pythonPlotting.py24
2 files changed, 21 insertions, 5 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py
index 2dcb4f89..f2ad973f 100644
--- a/src/ngspiceSimulation/NgspiceWidget.py
+++ b/src/ngspiceSimulation/NgspiceWidget.py
@@ -18,7 +18,7 @@ class NgspiceWidget(QtGui.QWidget):
if platform.system() == 'Linux':
self.command = "cd "+projPath+";ngspice "+command
#Creating argument for process
- self.args = ['-geometry','200x200','-into', str(self.terminal.winId()),'-hold','-e', self.command]
+ self.args = ['-into', str(self.terminal.winId()),'-hold','-e', self.command]
self.process.start('xterm', self.args)
elif platform.system() == 'Windows':
diff --git a/src/ngspiceSimulation/pythonPlotting.py b/src/ngspiceSimulation/pythonPlotting.py
index 1ae7bef4..7d37623d 100644
--- a/src/ngspiceSimulation/pythonPlotting.py
+++ b/src/ngspiceSimulation/pythonPlotting.py
@@ -87,11 +87,19 @@ class plotWindow(QtGui.QMainWindow):
self.chkbox[i].setStyleSheet('color')
self.chkbox[i].setToolTip('<b>Check To Plot</b>' )
self.top_grid.addWidget(self.chkbox[i],i+2,0)
+ self.colorLab = QtGui.QLabel()
+ self.colorLab.setText('____')
+ self.colorLab.setStyleSheet(self.colorName(self.color[i])+'; font-weight = bold;')
+ self.top_grid.addWidget(self.colorLab,i+2,1)
for i in range(self.a[1],self.a[0]-1):#a[0]-1
self.chkbox.append(QtGui.QCheckBox(self.obj_dataext.NBList[i]))
self.chkbox[i].setToolTip('<b>Check To Plot</b>' )
self.top_grid.addWidget(self.chkbox[i],i+3,0)
+ self.colorLab = QtGui.QLabel()
+ self.colorLab.setText('____')
+ self.colorLab.setStyleSheet(self.colorName(self.color[i])+'; font-weight = bold;')
+ self.top_grid.addWidget(self.colorLab,i+3,1)
self.clear = QtGui.QPushButton("Clear")
self.warnning = QtGui.QLabel()
@@ -375,9 +383,17 @@ class plotWindow(QtGui.QMainWindow):
if boxCheck == 0:
QtGui.QMessageBox.about(self,"Warning!!", "Please select atleast one Node OR Branch")
self.canvas.draw()
-
-
+ def colorName(self,letter):
+ return {
+ 'r':'color:red',
+ 'b':'color:blue',
+ 'g':'color:green',
+ 'y':'color:yellow',
+ 'c':'color:cyan',
+ 'm':'color:magenta',
+ 'k':'color:black'
+ }[letter]
class DataExtraction:
@@ -414,7 +430,7 @@ class DataExtraction:
#Finding totla number of voltage node
for i in self.voltData[3:]:
#it has possible names of voltage nodes in NgSpice
- if "V(" in i or "x1" in i or "u3" in i:
+ if "Index" in i:#"V(" in i or "x1" in i or "u3" in i:
vnumber+=1
#print "Voltage Number :",vnumber
@@ -536,7 +552,7 @@ class DataExtraction:
self.NBList.append(l)
self.NBList=self.NBList[2:]
len_NBList = len(self.NBList)
- #print "NBLIST",self.NBList
+ print "NBLIST",self.NBList
ivals=[]
inum = len(allv[5].split("\t"))