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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4308 - (download) (as text) (annotate)
Fri Jul 29 20:53:07 2016 UTC (3 years, 1 month ago) by cchiw
File size: 1451 byte(s)
added tensor types
import sys
import re
import os
from test_createField import createField
from test_writeDiderot import writeDiderot
from test_eval import eval
from test_compare import compare
from test_observed import observed
from obj_apply import *
from obj_ex import  *
from obj_field import *
from set import  *


# already created app object
def core(app, coeffs, dimF, names, runtimepath, isVis15):
    print "*******************************************"
    # testing positions
    x = "_"+(apply.get_all_FieldTys(app)+" |"+names)
    print x
    positions = get_positions(dimF)
    print "isvis15", isVis15
    print "run time path", runtimepath
    # samples
    outSize = get_size(dimF)
    #create synthetic field data with diderot
    createField(app, outSize, coeffs)
    #create diderot program with operator
    #print "about to write program"
    writeDiderot(p_Observ, app, positions, output, runtimepath, isVis15)
    #read observed data
    print "about to observe"
    observed_data = observed(app, output)
    print observed_data
    #correct values from python
    correct_data = eval(app , positions)
    print "correct data", correct_data

    if (len(observed_data)<1):
        rtn1 = "diderot could not handle program"
        print "thinks could not handle program"
        return ((rtn1,0,0,0,1), x, None, correct_data)
    else:
 
        rtn = compare(app, observed_data, correct_data)
        return (rtn, x, observed_data, correct_data)

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