Skip to content

Commit

Permalink
add manual grading to reception test
Browse files Browse the repository at this point in the history
  • Loading branch information
piberger committed Jul 5, 2016
1 parent 8aa578b commit e67deb5
Showing 1 changed file with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ def CustomInit(self):
'Value': '-',
'Label':'Grade'
},
'ManualGrade': {
'Value': '-',
'Label':'Manual grade'
},
'ElectricalGrade': {
'Value': '-',
'Label':'Electrical Grade'
Expand Down Expand Up @@ -51,7 +55,7 @@ def CustomInit(self):
},
}

self.ResultData['KeyList'] = ['Module', 'Grade', 'ElectricalGrade', 'IVGrade', 'DeadPixels', 'DefectiveBumps', 'DefectiveBumpsMax', 'DeadPixelsMax', 'Readback']
self.ResultData['KeyList'] = ['Module', 'Grade', 'ManualGrade', 'ElectricalGrade', 'IVGrade', 'DeadPixels', 'DefectiveBumps', 'DefectiveBumpsMax', 'DeadPixelsMax', 'Readback']

def OpenFileHandle(self):

Expand Down Expand Up @@ -103,14 +107,24 @@ def OpenFileHandle(self):
pass

# Final Grade
# translate grade from number to A/B/C
GradeMapping = {1:'A', 2:'B', 3:'C'}

ModuleGrade = max(ElectricalGrade, IVGrade)

# Grade C if incomplete
if Incomplete:
ModuleGrade = 3

# translate grade from number to A/B/C
GradeMapping = {1:'A', 2:'B', 3:'C'}
# manual Grade
ManualGrade = self.check_for_manualGrade()
if ManualGrade != '':
self.ResultData['KeyValueDictPairs']['ManualGrade']['Value'] = str(GradeMapping[int(ManualGrade)])
if GradeMapping[ModuleGrade] != GradeMapping[int(ManualGrade)]:
GradeComment = "Grade "+str(GradeMapping[ModuleGrade])+" -> "+str(GradeMapping[int(ManualGrade)])
print GradeComment
ModuleGrade = int(ManualGrade)

try:
Grade = GradeMapping[ModuleGrade]
except:
Expand Down

0 comments on commit e67deb5

Please sign in to comment.