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

SCM Repository

[diderot] Annotation of /branches/ein16/synth/d2/core.py
ViewVC logotype

Annotation of /branches/ein16/synth/d2/core.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4436 - (view) (download) (as text)

1 : cchiw 4252 import sys
2 :     import re
3 :     import os
4 :     from test_createField import createField
5 :     from test_writeDiderot import writeDiderot
6 :     from test_eval import eval
7 :     from test_compare import compare
8 :     from test_observed import observed
9 :     from obj_apply import *
10 :     from obj_ex import *
11 :     from obj_field import *
12 :     from set import *
13 :    
14 :    
15 :     # already created app object
16 :     def core(app, coeffs, dimF, names, runtimepath, isVis15):
17 :     print "*******************************************"
18 :     # testing positions
19 : cchiw 4268 x = "_"+(apply.get_all_FieldTys(app)+" |"+names)
20 :     print x
21 : cchiw 4252 positions = get_positions(dimF)
22 : cchiw 4268 print "isvis15", isVis15
23 :     print "run time path", runtimepath
24 : cchiw 4252 # samples
25 :     outSize = get_size(dimF)
26 :     #create synthetic field data with diderot
27 :     createField(app, outSize, coeffs)
28 :     #create diderot program with operator
29 :     #print "about to write program"
30 :     writeDiderot(p_Observ, app, positions, output, runtimepath, isVis15)
31 :     #read observed data
32 : cchiw 4268 print "about to observe"
33 : cchiw 4252 observed_data = observed(app, output)
34 : cchiw 4268 print observed_data
35 : cchiw 4252 #correct values from python
36 :     correct_data = eval(app , positions)
37 : cchiw 4268 print "correct data", correct_data
38 :    
39 : cchiw 4308 if (len(observed_data)<1):
40 : cchiw 4252 rtn1 = "diderot could not handle program"
41 : cchiw 4268 print "thinks could not handle program"
42 : cchiw 4436 return ((rtn1,0,0,0,0, 1, 0), x, None, correct_data)
43 : cchiw 4252 else:
44 :    
45 :     rtn = compare(app, observed_data, correct_data)
46 :     return (rtn, x, observed_data, correct_data)

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