From 1dd7f42e4fe21f7b854644536ff2be977f67e4a9 Mon Sep 17 00:00:00 2001 From: nilshah98 Date: Fri, 7 Jun 2019 11:38:49 +0530 Subject: ngspiceSimulation documentation done --- src/ngspiceSimulation/pythonPlotting.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/ngspiceSimulation/pythonPlotting.py') diff --git a/src/ngspiceSimulation/pythonPlotting.py b/src/ngspiceSimulation/pythonPlotting.py index 9e9db8f6..298d392c 100644 --- a/src/ngspiceSimulation/pythonPlotting.py +++ b/src/ngspiceSimulation/pythonPlotting.py @@ -501,11 +501,7 @@ class plotWindow(QtGui.QMainWindow): loc_x += 50 loc_y += 50 # Adding object of multimeter to dictionary - ( - self.obj_appconfig.dock_dict - [self.obj_appconfig.current_project['ProjectName']].append( - self.obj[j]) - ) + self.obj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']].append(self.obj[j]) if boxCheck == 0: QtGui.QMessageBox.about( -- cgit From cc9bb8d5d56e64b6e6b6ff2db988ff200b9f720d Mon Sep 17 00:00:00 2001 From: maddy-2 Date: Wed, 29 May 2019 22:59:53 +0530 Subject: ngspiceSimulation documentation added --- src/ngspiceSimulation/pythonPlotting.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/ngspiceSimulation/pythonPlotting.py') diff --git a/src/ngspiceSimulation/pythonPlotting.py b/src/ngspiceSimulation/pythonPlotting.py index 298d392c..848d9d54 100644 --- a/src/ngspiceSimulation/pythonPlotting.py +++ b/src/ngspiceSimulation/pythonPlotting.py @@ -11,6 +11,7 @@ from configuration.Appconfig import Appconfig import numpy as np +# This class creates Python Plotting window class plotWindow(QtGui.QMainWindow): def __init__(self, fpath, projectName): QtGui.QMainWindow.__init__(self) @@ -114,6 +115,7 @@ class plotWindow(QtGui.QMainWindow): '; font-weight = bold;') self.top_grid.addWidget(self.colorLab, i + 3, 1) + # Buttons for Plot, multimeter, plotting function. self.clear = QtGui.QPushButton("Clear") self.warnning = QtGui.QLabel() self.funcName = QtGui.QLabel() @@ -158,7 +160,10 @@ class plotWindow(QtGui.QMainWindow): self.scrollArea = QtGui.QScrollArea() self.scrollArea.setWidgetResizable(True) self.scrollArea.setWidget(self.widget) - + ''' + Right side box containing checkbox for different inputs and + options of plot, multimeter and plot function. + ''' self.finalhbox = QtGui.QHBoxLayout() self.finalhbox.addWidget(self.scrollArea) @@ -216,8 +221,9 @@ class plotWindow(QtGui.QMainWindow): QtCore.SIGNAL('clicked()'), self.onPush_dc) - self.setCentralWidget(self.mainFrame) - + self.setCentralWidget(self.mainFrame) + + # Defining clear funtion and plot. def pushedClear(self): self.text.clear() self.axes.cla() -- cgit From a0f738ba15264b69d9d51755569408bdd8e383b5 Mon Sep 17 00:00:00 2001 From: nilshah98 Date: Fri, 7 Jun 2019 18:54:35 +0530 Subject: pep8 fixes and list models bug fixed --- src/ngspiceSimulation/pythonPlotting.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/ngspiceSimulation/pythonPlotting.py') diff --git a/src/ngspiceSimulation/pythonPlotting.py b/src/ngspiceSimulation/pythonPlotting.py index 848d9d54..7cff21ef 100644 --- a/src/ngspiceSimulation/pythonPlotting.py +++ b/src/ngspiceSimulation/pythonPlotting.py @@ -175,10 +175,10 @@ class plotWindow(QtGui.QMainWindow): "List of Branches:") self.funcLabel.setText("Function:") self.funcName.setText( - "Standard functions\ + "Standard functions\

Addition:
Subtraction:
\ Multiplication:
Division:
Comparison:" - ) + ) self.funcExample.setText( "\n\nNode1 + Node2\nNode1 - Node2\nNode1 * Node2\nNode1 / Node2\ \nNode1 vs Node2") @@ -507,7 +507,12 @@ class plotWindow(QtGui.QMainWindow): loc_x += 50 loc_y += 50 # Adding object of multimeter to dictionary - self.obj_appconfig.dock_dict[self.obj_appconfig.current_project['ProjectName']].append(self.obj[j]) + ( + self.obj_appconfig. + dock_dict[ + self.obj_appconfig.current_project['ProjectName']]. + append(self.obj[j]) + ) if boxCheck == 0: QtGui.QMessageBox.about( -- cgit From aa20d92a95166a82f93a19594ede632de0666c8b Mon Sep 17 00:00:00 2001 From: maddy-2 Date: Fri, 31 May 2019 16:00:23 +0530 Subject: ProjectExplorer, pythonPlotting documentation added --- src/ngspiceSimulation/pythonPlotting.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/ngspiceSimulation/pythonPlotting.py') 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("AC Analysis") 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("Transient Analysis") self.connect( @@ -215,6 +220,7 @@ class plotWindow(QtGui.QMainWindow): self.onPush_trans) else: + # For DC analysis self.analysisType.setText("DC Analysis") 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(" ") -- cgit