-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviz_conn_mats.py
More file actions
46 lines (25 loc) · 760 Bytes
/
viz_conn_mats.py
File metadata and controls
46 lines (25 loc) · 760 Bytes
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
from dipy.io.pickles import load_pickle
from dipy.reconst.dti import TensorModel
def show_conn_mat(filename):
d = load_pickle(filename)
method = filename.split('__')[1].split('_')[0]
subplot(2, 2, 1)
title(method + ' full')
imshow(d['mat'])
subplot(2, 2, 2)
title(method + ' 0.5')
imshow(d['conn_mats'][0])
subplot(2, 2, 3)
title(method + ' 1.')
imshow(d['conn_mats'][1])
subplot(2, 2, 4)
title(method + ' 1.5')
imshow(d['conn_mats'][2])
print 'Diffs: ', d['diffs']
try:
print 'Ratio: ', d['ratio']
except KeyError:
print 'KeyError: ratio does not exist'
if __name__ == '__main__':
import sys
show_conn_mat(sys.argv[1])