summaryrefslogtreecommitdiff
path: root/src/ngspiceSimulation
diff options
context:
space:
mode:
authorfahim2015-05-15 17:51:50 +0530
committerfahim2015-05-15 17:51:50 +0530
commita341c872157b497306e964c4407b012774cc0597 (patch)
tree22ade101e6e0e40109ba3dfc6dba8c4ae21ecb3e /src/ngspiceSimulation
parentb02da14912ca9bf756db0828d6d94d1d732d8476 (diff)
downloadeSim-a341c872157b497306e964c4407b012774cc0597.tar.gz
eSim-a341c872157b497306e964c4407b012774cc0597.tar.bz2
eSim-a341c872157b497306e964c4407b012774cc0597.zip
Subject: Update KicadToNgSpice Converter file
Description: Added proper GUI for error message in case of unknown model used in schematic or multiple model is available in modelParamXML directory.
Diffstat (limited to 'src/ngspiceSimulation')
-rw-r--r--src/ngspiceSimulation/pythonPlotting.py21
-rw-r--r--src/ngspiceSimulation/pythonPlotting.pycbin17145 -> 16955 bytes
2 files changed, 11 insertions, 10 deletions
diff --git a/src/ngspiceSimulation/pythonPlotting.py b/src/ngspiceSimulation/pythonPlotting.py
index e2156920..9e7761fe 100644
--- a/src/ngspiceSimulation/pythonPlotting.py
+++ b/src/ngspiceSimulation/pythonPlotting.py
@@ -1,8 +1,6 @@
from __future__ import division # Used for decimal division eg 2/3=0.66 and not '0' 6/2=3.0 and 6//2=3
-import sys, os
-from PyQt4 import QtGui, uic, QtCore
-from decimal import *
-import matplotlib
+from PyQt4 import QtGui, QtCore
+from decimal import Decimal
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar
from matplotlib.figure import Figure
@@ -12,8 +10,6 @@ import tkMessageBox
class plotWindow(QtGui.QMainWindow):
def __init__(self,fpath,projectName):
QtGui.QMainWindow.__init__(self)
- print "Path : ",fpath
- print "Project :",projectName
self.fpath = fpath
self.projName = projectName
self.createMainFrame()
@@ -24,9 +20,13 @@ class plotWindow(QtGui.QMainWindow):
def createMainFrame(self):
self.main_frame = QtGui.QWidget()
self.dpi = 100
+ #Creating Figure Canvas
self.fig = Figure((7.0, 7.0), dpi=self.dpi)
self.canvas = FigureCanvas(self.fig)
self.canvas.setParent(self.main_frame)
+ self.canvas.setSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Expanding)
+ self.canvas.updateGeometry()
+
self.axes = self.fig.add_subplot(111)
self.mpl_toolbar = NavigationToolbar(self.canvas, self.main_frame)
@@ -37,10 +37,11 @@ class plotWindow(QtGui.QMainWindow):
right_vbox = QtGui.QVBoxLayout()
right_grid = QtGui.QGridLayout()
top_grid = QtGui.QGridLayout()
-
+
+ ##Processing data file to extract data in proper format
self.fobj = File_data()
plot_type = self.fobj.openFile(self.fpath)
- #print "hi:",plot_type
+ print "Plot Type :",plot_type
self.fobj.computeAxes()
self.chkbox=[]
self.a = self.fobj.numVals()
@@ -113,7 +114,7 @@ class plotWindow(QtGui.QMainWindow):
right_grid.addWidget(self.Note2,4,1)
right_vbox.addLayout(right_grid)
-
+ '''
netlist = QtGui.QTextEdit()
with open (self.fpath+"/"+self.projName+'.cir.out') as f2:
fdata = f2.read()
@@ -122,7 +123,7 @@ class plotWindow(QtGui.QMainWindow):
left_vbox.addWidget(netlist)
-
+ '''
hbox = QtGui.QHBoxLayout()
hbox.addLayout(left_vbox)
hbox.addLayout(right_vbox)
diff --git a/src/ngspiceSimulation/pythonPlotting.pyc b/src/ngspiceSimulation/pythonPlotting.pyc
index bd5a225f..cb7a4f00 100644
--- a/src/ngspiceSimulation/pythonPlotting.pyc
+++ b/src/ngspiceSimulation/pythonPlotting.pyc
Binary files differ