diff options
Diffstat (limited to 'src/ngspiceSimulation')
-rw-r--r-- | src/ngspiceSimulation/pythonPlotting.py | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/ngspiceSimulation/pythonPlotting.py b/src/ngspiceSimulation/pythonPlotting.py index 7cff21ef..9f8f8e88 100644 --- a/src/ngspiceSimulation/pythonPlotting.py +++ b/src/ngspiceSimulation/pythonPlotting.py @@ -13,6 +13,11 @@ import numpy as np # This class creates Python Plotting window class plotWindow(QtGui.QMainWindow): + ''' + This class defines python plotting window, its features, buttons, + colors, AC and DC analysis, plotting etc. + ''' + def __init__(self, fpath, projectName): QtGui.QMainWindow.__init__(self) self.fpath = fpath @@ -137,7 +142,7 @@ class plotWindow(QtGui.QMainWindow): self.palette2.setColor(QtGui.QPalette.Foreground, QtCore.Qt.red) self.funcName.setPalette(self.palette1) self.funcExample.setPalette(self.palette2) - + # Widgets for grid, plot button and multimeter button. self.right_vbox.addLayout(self.top_grid) self.right_vbox.addWidget(self.plotbtn) self.right_vbox.addWidget(self.multimeterbtn) @@ -166,7 +171,7 @@ class plotWindow(QtGui.QMainWindow): ''' self.finalhbox = QtGui.QHBoxLayout() self.finalhbox.addWidget(self.scrollArea) - + # Right side window frame showing list of nodes and branches. self.mainFrame.setLayout(self.finalhbox) self.showMaximized() @@ -193,7 +198,7 @@ class plotWindow(QtGui.QMainWindow): self.multimeterbtn, QtCore.SIGNAL('clicked()'), self.multiMeter) - + # for AC analysis if self.plotType[0] == 0: self.analysisType.setText("<b>AC Analysis</b>") if self.plotType[1] == 1: @@ -206,7 +211,7 @@ class plotWindow(QtGui.QMainWindow): self.plotbtn, QtCore.SIGNAL('clicked()'), self.onPush_ac) - + # for transient analysis elif self.plotType[0] == 1: self.analysisType.setText("<b>Transient Analysis</b>") self.connect( @@ -215,6 +220,7 @@ class plotWindow(QtGui.QMainWindow): self.onPush_trans) else: + # For DC analysis self.analysisType.setText("<b>DC Analysis</b>") self.connect( self.plotbtn, @@ -223,7 +229,7 @@ class plotWindow(QtGui.QMainWindow): self.setCentralWidget(self.mainFrame) - # Defining clear funtion and plot. + # definition of functions pushedClear, pushedPlotFunc. def pushedClear(self): self.text.clear() self.axes.cla() @@ -378,6 +384,9 @@ class plotWindow(QtGui.QMainWindow): self.combo = [] self.combo1 = [] self.combo1_rev = [] + + # definition of functions onPush_decade, onPush_ac, onPush_trans,\ + # onPush_dc, color and multimeter and getRMSValue. def onPush_decade(self): # print "Calling on push Decade" boxCheck = 0 @@ -561,7 +570,7 @@ class DataExtraction: self.x = [] # stores x-axis data def numberFinder(self, fpath): - # Opening ANalysis file + # Opening Analysis file with open(os.path.join(fpath, "analysis")) as f3: self.analysisInfo = f3.read() self.analysisInfo = self.analysisInfo.split(" ") |