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

SCM Repository

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

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

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

revision 4410, Fri Aug 12 18:28:32 2016 UTC revision 4411, Fri Aug 12 18:28:57 2016 UTC
# Line 9  Line 9 
9  def getObserv_1(p_out):  def getObserv_1(p_out):
10      obs = []      obs = []
11      name = p_out+".txt"      name = p_out+".txt"
     print "looking for-1",name  
12      if(os.path.exists(name)):      if(os.path.exists(name)):
         print "thinks we have it"  
13          obsf = open(name, 'r')          obsf = open(name, 'r')
14          obsf.readline()          obsf.readline()
15          for line in obsf:          for line in obsf:
16              print "line",line              #print "line",line
17              m = re.split(r'\n',line)              m = re.split(r'\n',line)
18              if m:              if m:
19                  u0 = m[0]                  u0 = m[0]
20                  obs.append(float(u0))                  obs.append(float(u0))
21          return obs          return obs
     print "does not think we have it"  
22      return []      return []
23    
24  #n inputs per line  #n inputs per line

Legend:
Removed from v.4410  
changed lines
  Added in v.4411

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