diff options
-rw-r--r-- | src/frontEnd/ProjectExplorer.py | 4 | ||||
-rw-r--r-- | src/ngspiceSimulation/pythonPlotting.py | 21 |
2 files changed, 17 insertions, 8 deletions
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py index 02d4c54c..d84f41e0 100644 --- a/src/frontEnd/ProjectExplorer.py +++ b/src/frontEnd/ProjectExplorer.py @@ -45,8 +45,8 @@ class ProjectExplorer(QtGui.QWidget): os.path.join(parents) if os.path.exists(parents): pathlist = parents.split(os.sep) - parentnode = QtGui.QTreeWidgetItem(function - self.treewidget, [pathlist[-1], parents]) + parentnode = QtGui.QTreeWidgetItem(self.treewidget, + [pathlist[-1], parents]) for files in children: QtGui.QTreeWidgetItem( parentnode, [files, os.path.join(parents, files)]) 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(" ") |