summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice/Analysis.py
diff options
context:
space:
mode:
authornilshah982019-06-07 19:01:08 +0530
committernilshah982019-06-13 12:15:50 +0530
commitfd8107b2f5662851dd5d3a7388e46d6be1eb5125 (patch)
treeaf6fc5573021c7d00d515fdde0a7178cc0147236 /src/kicadtoNgspice/Analysis.py
parentaa20d92a95166a82f93a19594ede632de0666c8b (diff)
downloadeSim-fd8107b2f5662851dd5d3a7388e46d6be1eb5125.tar.gz
eSim-fd8107b2f5662851dd5d3a7388e46d6be1eb5125.tar.bz2
eSim-fd8107b2f5662851dd5d3a7388e46d6be1eb5125.zip
kicadtoNgspice documentation added
Diffstat (limited to 'src/kicadtoNgspice/Analysis.py')
-rw-r--r--src/kicadtoNgspice/Analysis.py99
1 files changed, 60 insertions, 39 deletions
diff --git a/src/kicadtoNgspice/Analysis.py b/src/kicadtoNgspice/Analysis.py
index a60a2286..c5981f4d 100644
--- a/src/kicadtoNgspice/Analysis.py
+++ b/src/kicadtoNgspice/Analysis.py
@@ -36,6 +36,14 @@ class Analysis(QtGui.QWidget):
self.createAnalysisWidget()
def createAnalysisWidget(self):
+ """
+ - Create the main anaylsis widget overwiew
+ - - Checkbox for analysis type
+ - - Respective analysis type group, AC, DC, TRAN...
+ - Check for `analysis` file, if any in projDir, extract data from it
+ - Else set the default checkbox to `TRAN`
+ - Accordingly set state for track widget options
+ """
self.grid = QtGui.QGridLayout()
self.grid.addWidget(self.createCheckBox(), 0, 0)
self.grid.addWidget(self.createACgroup(), 1, 0)
@@ -100,13 +108,12 @@ class Analysis(QtGui.QWidget):
self.setLayout(self.grid)
self.show()
- '''
- - Create the checkboxes for analysis type, under analysis tab
- - checkbox > checkgrid > checkgroupbtn > checkAC | checkDC | checkTRAN
- - Trigger enableBox on clicking
- '''
-
def createCheckBox(self):
+ """
+ - Create the checkboxes for analysis type, under analysis tab
+ - checkbox > checkgrid > checkgroupbtn > checkAC | checkDC | checkTRAN
+ - Trigger enableBox on clicking
+ """
self.checkbox = QtGui.QGroupBox()
self.checkbox.setTitle("Select Analysis Type")
self.checkgrid = QtGui.QGridLayout()
@@ -129,12 +136,11 @@ class Analysis(QtGui.QWidget):
return self.checkbox
- '''
- - Activate deactive analysis areas according to type
- - Add analysis data to track_obj from TrackWidget
- '''
-
def enableBox(self):
+ """
+ - Activate deactive analysis areas according to type
+ - Add analysis data to track_obj from TrackWidget
+ """
if self.checkAC.isChecked():
self.acbox.setDisabled(False)
self.dcbox.setDisabled(True)
@@ -153,15 +159,14 @@ class Analysis(QtGui.QWidget):
self.dcbox.setDisabled(True)
self.track_obj.set_CheckBox["ITEMS"] = "TRAN"
- '''
- - Designing of AC group in analysis tab
- - 3 radio buttons - Lin | Dec | Oct
- - 3 input boxes, with top 2 combos\
- - If previous values exist then fill default values from
- previous value json file
- '''
-
def createACgroup(self):
+ """
+ - Designing of AC group in analysis tab
+ - 3 radio buttons - Lin | Dec | Oct
+ - 3 input boxes, with top 2 combos\
+ - If previous values exist then fill default values from
+ previous value json file
+ """
kicadFile = self.clarg1
(projpath, filename) = os.path.split(kicadFile)
project_name = os.path.basename(projpath)
@@ -315,16 +320,25 @@ class Analysis(QtGui.QWidget):
'''
def start_combovalue(self, text):
+ """
+ - Handle start_fre_combo box event
+ - Check where it is Hz, MHz, etc.
+ - Accordingly set ac_parameter
+ """
self.ac_parameter[0] = str(text)
def stop_combovalue(self, text):
+ """
+ - Handle stop_fre_combo box event
+ - Check where it is Hz, MHz, etc.
+ - Accordingly set ac_parameter
+ """
self.ac_parameter[1] = str(text)
- '''
- - Set track object for AC, according to the type of radio box selected
- '''
-
def set_ac_type(self):
+ """S
+ - Set track object for AC, according to the type of radio box selected
+ """
self.parameter_cnt = 0
if self.Lin.isChecked():
@@ -336,11 +350,17 @@ class Analysis(QtGui.QWidget):
else:
pass
- '''
- - Create DC area under analysis tab
- '''
-
def createDCgroup(self):
+ """
+ - Create DC area under analysis tab
+ - Source 1 and 2, each having 4 input boxes as follows
+ - - Source
+ - - Start
+ - - Increment
+ - - Stop
+ - The last 3 have combo box pertaining to their unit as well
+ - Also in the end a checkbox, for operating system point analysis
+ """
kicadFile = self.clarg1
(projpath, filename) = os.path.split(kicadFile)
project_name = os.path.basename(projpath)
@@ -612,10 +632,7 @@ class Analysis(QtGui.QWidget):
return self.dcbox
- '''
- - Below 6 functions to handle combo boxes for the DC group
- '''
-
+ # Below 6 functions to handle combo boxes for the DC group
def start_changecombo(self, text):
self.dc_parameter[0] = str(text)
@@ -634,21 +651,25 @@ class Analysis(QtGui.QWidget):
def stop_changecombo2(self, text):
self.dc_parameter[5] = str(text)
- '''
- - Handles the Operating point analysis checkbox
- '''
-
def setflag(self):
+ """
+ - Handles the Operating point analysis checkbox
+ """
if self.check.isChecked():
self.track_obj.op_check.append(1)
else:
self.track_obj.op_check.append(0)
- '''
- - Creating transient group under analysis and creating it's components
- '''
-
def createTRANgroup(self):
+ """
+ - Creating transient group under analysis and creating it's components
+ - Contains 3 inout and combo boxes for -
+ - - Start time
+ - - Step time
+ - - Stop time
+ - Input boxes for values, combo boxes for unit
+ - Accordingly also event handleres for combo boxes, creates 3 functions
+ """
kicadFile = self.clarg1
(projpath, filename) = os.path.split(kicadFile)
project_name = os.path .basename(projpath)