Archived
Initial commit
This commit is contained in:
commit
d89b82be4a
103 files changed
+23110
No files matched your search
@@ -0,0 +1,42 @@
|
||||
import os
|
||||
from crm_options import expe_options as crmOptions
|
||||
from scipy.io import savemat
|
||||
from crm_robot import robot
|
||||
from crm_build_conditions import expe_build_conditions as buildConditions
|
||||
from tools.load_matrix import loadmat
|
||||
|
||||
|
||||
def main(options, subject, phase, lang, p_exists, ip, port):
|
||||
options = {}
|
||||
options["subject_name"] = subject
|
||||
options = crmOptions(options)
|
||||
|
||||
options["language"] = lang
|
||||
|
||||
res_filename = os.path.join(options["result_path"], '{}{}_{}_robot.mat'.format(
|
||||
options["result_prefix"], lang.lower(), subject))
|
||||
options["res_filename"] = res_filename
|
||||
|
||||
res_tracker = os.path.join(
|
||||
options["result_path"], '{}_tracker.mat'.format(subject))
|
||||
options["res_tracker"] = res_tracker
|
||||
if not os.path.exists(res_tracker):
|
||||
track = {}
|
||||
track["experiment_begin"] = 1
|
||||
|
||||
track["experiments"] = {}
|
||||
track["experiments"]["fishy"] = 0
|
||||
track["experiments"]["gender"] = 0
|
||||
track["experiments"]["emotion"] = 0
|
||||
track["experiments"]["crm"] = 0
|
||||
|
||||
savemat(res_tracker, mdict={"tracker": track})
|
||||
|
||||
if not os.path.exists(res_filename):
|
||||
expe, options = buildConditions(options)
|
||||
else:
|
||||
mat = loadmat(options["res_filename"])
|
||||
expe = mat["expe"]
|
||||
options = mat["options"]
|
||||
|
||||
robot(ip, port, lang, options, phase)
|
||||
Reference in new issue
Block a user