Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/ein16/synth/d2/test_compare.py
ViewVC logotype

Diff of /branches/ein16/synth/d2/test_compare.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4435, Fri Aug 19 16:59:34 2016 UTC revision 4436, Fri Aug 19 19:35:37 2016 UTC
# Line 17  Line 17 
17      rst_check = 0      rst_check = 0
18      rst_terrible= 0      rst_terrible= 0
19      rst_compile = 0      rst_compile = 0
20        rst_NA = 0
21      if (maxdiff<=0.0001):      if (maxdiff<=0.0001):
22          rtn = "Results: "+var+": V-0 A"          rtn = "Results: "+var+": V-0 A"
23          rst_good = 1          rst_good = 1
24          return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)          return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
25      elif (maxdiff<=0.001):      elif (maxdiff<=0.001):
26          if(per>10):          if(per>10):
27              rtn = "Results: "+var+": W+3 C"+s              rtn = "Results: "+var+": W+3 C"+s
28              rst_check = 1              rst_check = 1
29              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
30          elif(per>1):          elif(per>1):
31              rtn = "Results: "+var+": W-2 B"+s              rtn = "Results: "+var+": W-2 B"+s
32              rst_check = 1              rst_check = 1
33              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
34          elif(per>0.1):          elif(per>0.1):
35              rtn = "Results: "+var+": W-1 A"+s              rtn = "Results: "+var+": W-1 A"+s
36              rst_good = 1              rst_good = 1
37              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
38          else:          else:
39              rtn = "Results: "+var+": W-0 A"              rtn = "Results: "+var+": W-0 A"
40              rst_good = 1              rst_good = 1
41              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
42      elif (maxdiff<=0.01):      elif (maxdiff<=0.01):
43          if(per>10):          if(per>10):
44              rtn = "Results: "+var+": X+3 C"+s              rtn = "Results: "+var+": X+3 C"+s
45              rst_check = 1              rst_check = 1
46              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
47          elif(per>1):          elif(per>1):
48              rtn = "Results: "+var+": X-2 B"+s              rtn = "Results: "+var+": X-2 B"+s
49              rst_check = 1              rst_check = 1
50              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
51          elif(per>0.1):          elif(per>0.1):
52              rtn = "Results: "+var+": X-1 B"+s              rtn = "Results: "+var+": X-1 B"+s
53              rst_eh = 1              rst_eh = 1
54              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
55          else:          else:
56              rtn = "Results: "+var+": X-0 A"              rtn = "Results: "+var+": X-0 A"
57              rst_good = 1              rst_good = 1
58              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
59      elif(maxdiff<=0.1):      elif(maxdiff<=0.1):
60          if(per>10):          if(per>10):
61              rtn = "Results: "+var+": Y-3 D "+s              rtn = "Results: "+var+": Y-3 D "+s
62              rst_terrible = 1              rst_terrible = 1
63              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
64          elif(per>1):          elif(per>1):
65              rtn = "Results: "+var+": Y-2 C"+s              rtn = "Results: "+var+": Y-2 C"+s
66              rst_check = 1              rst_check = 1
67              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
68          elif(per>0.1):          elif(per>0.1):
69              rtn = "Results: "+var+": Y-1 B"+s              rtn = "Results: "+var+": Y-1 B"+s
70              rst_eh = 1              rst_eh = 1
71              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
72          else:          else:
73              rtn = "Results: "+var+": Y-0 B"+s              rtn = "Results: "+var+": Y-0 B"+s
74              rst_eh = 1              rst_eh = 1
75              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
76      else:      else:
77          if(per>10):          if(per>10):
78              rtn = "Results: "+var+": Z-3 D "+s              rtn = "Results: "+var+": Z-3 D "+s
79              rst_terrible = 1              rst_terrible = 1
80              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
81          elif(per>1):          elif(per>1):
82              rtn = "Results: "+var+": Z-2 D "+s              rtn = "Results: "+var+": Z-2 D "+s
83              rst_terrible = 1              rst_terrible = 1
84              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
85          elif(per>0.1):          elif(per>0.1):
86              rtn = "Results: "+var+": Z-1 C"+s              rtn = "Results: "+var+": Z-1 C"+s
87              rst_check = 1              rst_check = 1
88              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
89          else:          else:
90              rtn = "Results: "+var+": Z-0 B "+s              rtn = "Results: "+var+": Z-0 B "+s
91              rst_eh = 1              rst_eh = 1
92              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile)              return (rtn, rst_good, rst_eh, rst_check, rst_terrible, rst_compile, rst_NA)
93    
94    
95  #difference and error between observed data and correct data  #difference and error between observed data and correct data
# Line 130  Line 131 
131          else:          else:
132              break              break
133      if(t==0):      if(t==0):
134          maxdiff=999999999.7          rtn ="NAN-single"
135          pre ="NAN-single"          return  (rtn, 0, 0, 0, 0, 0, 1)
         per =100  
         return toStr(name,"x0", maxdiff,maxdiff, per ,pre)  
136      else:      else:
137          if(o6==0):          if(o6==0):
138              per = 0.0              per = 0.0
# Line 197  Line 196 
196          per  = abs(100*(maxdiff/o6))          per  = abs(100*(maxdiff/o6))
197    
198      if(t==0):      if(t==0):
199          maxdiff=999999999.7          rtn ="NAN-multiple"
200          pre ="NAN-multiple"          return  (rtn, 0, 0, 0, 0, 0, 1)
         per =100  
         return toStr(name,"x0", maxdiff,maxdiff, per ,pre)  
201      else:      else:
202          avg = sumdiff/length          avg = sumdiff/length
203          s=" max diff: "+str(round(maxdiff,4))+" sumdiff: "+str(round(avg,4))+" "+ str(round(per,4))+"% c:"+str( c6)+ " o:"+str(o6)+pre          s=" max diff: "+str(round(maxdiff,4))+" sumdiff: "+str(round(avg,4))+" "+ str(round(per,4))+"% c:"+str( c6)+ " o:"+str(o6)+pre

Legend:
Removed from v.4435  
changed lines
  Added in v.4436

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0