Skip to content

Commit

Permalink
table populated with pixel, direction and substrate now
Browse files Browse the repository at this point in the history
  • Loading branch information
greyltc committed Jun 2, 2018
1 parent 787a25a commit e75baec
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
27 changes: 24 additions & 3 deletions batch_iv_analysis/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,28 @@ def __init__(self, analyzer):
thisKey = 'exportBtn'
self.cols[thisKey] = col()
self.cols[thisKey].header = 'Export'
self.cols[thisKey].tooltip = 'Click this button to export\ninterpolated data points from fits'
self.cols[thisKey].tooltip = 'Click this button to export\ninterpolated data points from fits'

thisKey = 'file'
self.cols[thisKey] = col()
self.cols[thisKey].header = 'File'
self.cols[thisKey].tooltip = 'File name\nHover to see header from data file'

thisKey = 'substrate'
self.cols[thisKey] = col()
self.cols[thisKey].header = 'Subs'
self.cols[thisKey].tooltip = 'Substrate position'

thisKey = 'pixel'
self.cols[thisKey] = col()
self.cols[thisKey].header = 'Pix'
self.cols[thisKey].tooltip = 'Pixel number'

thisKey = 'direction'
self.cols[thisKey] = col()
self.cols[thisKey].header = 'Dir'
self.cols[thisKey].tooltip = 'Scan direction'

thisKey = 'pce_spline'
self.cols[thisKey] = col()
self.cols[thisKey].header = 'PCE\n[%]'
Expand Down Expand Up @@ -768,7 +783,7 @@ def clearTableCall(self):
def newFiles(self, fullPaths):
self.analyzer.processFiles(fullPaths, self.processFitResult, self.primeRow)

def primeRow(self, fullPath):
def primeRow(self, fullPath, fileData):
"""primes a new row in the table"""
#analysisParams = []

Expand All @@ -794,6 +809,12 @@ def primeRow(self, fullPath):
self.tableInsert(thisRow,'file', fileName, role=Qt.DisplayRole)
self.tableInsert(thisRow,'file', params['uid'])

self.tableInsert(thisRow,'substrate', fileData.substrate, role=Qt.DisplayRole)
self.tableInsert(thisRow,'pixel', fileData.pixel, role=Qt.DisplayRole)
self.tableInsert(thisRow,'direction', 'Rev.' if fileData.reverseSweep else 'Fwd.', role=Qt.DisplayRole)
self.tableInsert(thisRow,'suns', fileData.suns, role=Qt.DisplayRole)
self.tableInsert(thisRow,'area', fileData.area, role=Qt.DisplayRole)

#self.tableInsert(thisRow,'file', fileName)
#self.ui.tableWidget.item(thisRow,self.getCol('file')).setData(Qt.UserRole,analysisParams['uid']) # uid for the row
#thisItem.setText(fileName)
Expand Down Expand Up @@ -935,7 +956,7 @@ def populateRow(self,rowData):

for key,value in rowData.__dict__.items():
colName = key
if key not in ['row','i','v','vsTime','x','splineCurrent','eqnCurrent']:
if key not in ['row','i','v','vsTime','x','splineCurrent','eqnCurrent', 'area', 'suns']:
self.tableInsert(rowData.row, key, value)

self.sanitizeRow(rowData.row)
Expand Down
2 changes: 1 addition & 1 deletion batch_iv_analysis/ivAnalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def processFiles(self, paths, returnCall, prepCall):
pixel = fileData.pixel
substrate = fileData.substrate
reverseSweep = fileData.reverseSweep
thisParams = prepCall(fullPath)
thisParams = prepCall(fullPath, fileData)

if self.multiprocess:
futures.append(self.pool.submit(ivAnalyzer.processCurve, VV, II, vsTime, suns, area, thisParams, self.dillPickle, fullPath))
Expand Down

0 comments on commit e75baec

Please sign in to comment.