Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

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

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

revision 4209, Thu Jul 14 17:37:50 2016 UTC revision 4210, Thu Jul 14 18:01:19 2016 UTC
# Line 13  Line 13
13          rtn = "Results: "+var+": good"          rtn = "Results: "+var+": good"
14          #   f.write("\n\t\t"+rtn)          #   f.write("\n\t\t"+rtn)
15          #f.close()          #f.close()
16          print rtn          #print rtn
17          return (rtn,1,0,0,0)          return (rtn,1,0,0,0)
18      elif (maxdiff<=0.1):      elif (maxdiff<=0.1):
19          rtn = "Results: "+var+": eh "+x          rtn = "Results: "+var+": eh "+x
20          #f.write("\n\t\t"+rtn)          #f.write("\n\t\t"+rtn)
21          #f.close()          #f.close()
22          print rtn          #print rtn
23          return (rtn,0,1,0,0)          return (rtn,0,1,0,0)
24      else:      else:
25          rtn = "Results: "+var+": terrible "+x          rtn = "Results: "+var+": terrible "+x
26          #f.write("\n\t\t"+rtn)          #f.write("\n\t\t"+rtn)
27          #f.close()          #f.close()
28          print rtn          #print rtn
29          return (rtn,0,0,1,0)          return (rtn,0,0,1,0)
30  #difference and error between observed data and correct data  #difference and error between observed data and correct data
31  #output is length 1  #output is length 1
# Line 62  Line 62
62              diff=abs(o1-c1)              diff=abs(o1-c1)
63              if(diff > maxdiff):              if(diff > maxdiff):
64                  maxdiff = diff                  maxdiff = diff
65              print("current maximal difference", maxdiff, "c: ", c1, " o:",o1)              #print("current maximal difference", maxdiff, "c: ", c1, " o:",o1)
66              if(c1==0):              if(c1==0):
67                  break                  break