-
Notifications
You must be signed in to change notification settings - Fork 0
/
script_check_S.jl
80 lines (71 loc) · 2.5 KB
/
script_check_S.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
## load experimental candidates and calculate their similarity matrices
# usage: Run a simulation of the roving experiment first.
# then run this script
# if S is commented out in plot_D_vector.jl then it will plot the
# accurate flow fields for each simulation in turn (since they're
# evaluated here first)
task_id = 2; # red or green
exp_id = 2; # in biased sim this is biased 1 (red) or biased 2 (green)
use_linear_out = true :: Bool; # otherwise Binary
use_roving_subjects = true :: Bool;
result_set_id = 1 :: Int;
# set critic_dimensions and
# comment out S and
# disable trajectories and
# choose measured vs perfect probabilites
# in the plotting file!
include("plotting_assist_functions.jl");
for i=1:no_subjects
if (!use_roving_subjects)
restore_subject(exp_results[result_set_id].subjects_task[i, task_id], false);
else
print("Roving subject\n");
task_id = exp_id;
restore_subject(exp_results[result_set_id].subjects_roving_task[i, exp_id], false);
end
pos = sum( pre(1.0,task_id,linear_tc()) .* pre(1.0, task_id, linear_tc()) );
neg = sum( pre(-1.0,task_id,linear_tc()) .* pre(-1.0, task_id, linear_tc()) );
pn = sum( pre(1.0,task_id,linear_tc()) .* pre(-1.0, task_id, linear_tc()) );
if(use_linear_out)
include("plot_D_vector.jl");
setup_plot_D_basic_variables();
else
include("plot_Dbinary_vector.jl");
setup_plot_D_binary_basic_variables();
end
#= if(use_roving_subjects)
global critic_dimensions = 4;
# perfect critic (overwritten if any of the following are active)
global C = eye(critic_dimensions);
# Probabilistic presentation of individual tasks critic
global prob_task = ones(1,critic_dimensions);
prob_task /= critic_dimensions;
global A = eye(critic_dimensions) - C;
end=#
print("$pos $neg $pn\n")
global a = neg;
global S = [neg pn; pn pos];
print("",S,"\n")
S /= S[1,1];
a = S[1,2];
#S[1,:] /= S[1,1];
#S[2,:] /= S[2,2];
print("$i: \n", S , "\n");
if(use_linear_out)
#include("plot_D_vector.jl");
#setup_plot_D_basic_variables();
global use_overlay_D_pos_Euler_trajectories = false;
global use_overlay_p_Euler_trajectories = false;
calculate_linear_model_flow_vectors()
plot_linear_model_flow_vectors()
else
#include("plot_Dbinary_vector.jl")
calculate_binary_model_flow_vectors()
plot_binary_model_flow_vectors()
end
if (!use_roving_subjects)
add_specific_trajectory_to_linear_p_plot(exp_results[result_set_id],task_id, i);
else
add_specific_roving_trajectory_to_linear_p_plot(exp_results[result_set_id],exp_id, i);
end
end