-
Notifications
You must be signed in to change notification settings - Fork 0
/
coherence.sh
70 lines (62 loc) · 1.61 KB
/
coherence.sh
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
#!/bin/bash
echo source downloads/pyenv/bin/activate
source downloads/pyenv/bin/activate
echo ""
echo " Coherence"
echo ""
PS3=": "
select opt in "run permutation" "run coherence" "run combine" quit; do
case $opt in
"run permutation")
echo "permutation"
currDir=`pwd`
echo cd opencl
cd opencl
echo python3 perm.py example pc 1000 0
python3 perm.py example pc 1000 0
echo "Note: if failed, make sure pyopencl is properly installed and configured"
# return to starting dir
echo "cd $currDir"
cd $currDir
break
;;
"run coherence")
echo "coherence"
currDir=`pwd`
echo cd opencl
cd opencl
echo python3 graph.py example pc 0
python3 graph.py example pc 0
echo "Note: if failed, make sure pyopencl is properly installed and configured"
# return to starting dir
echo "cd $currDir"
cd $currDir
break
;;
"run combine")
echo "combine"
currDir=`pwd`
echo cd opencl
cd opencl
echo rm results/*.mat
rm results/*.mat
# fit permutation distribution
echo matlab -nodesktop -nosplash -r "fitPerm;exit()"
matlab -nodesktop -nosplash -r "fitPerm;exit()"
# combine coherences across subjects
cd ../stats
echo matlab -nodesktop -nosplash -r "xsub_out_all_stats_allatl;exit()"
matlab -nodesktop -nosplash -r "xsub_out_stats_allatl;exit()"
# return to starting dir
echo "cd $currDir"
cd $currDir
break
;;
quit)
break
;;
*)
echo "Invalid option $REPLY"
;;
esac
done