forked from francopestilli/life
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.m
43 lines (32 loc) · 1.1 KB
/
main.m
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
function [] = main()
%if isempty(getenv('SCA_SERVICE_DIR'))
% setenv('SCA_SERVICE_DIR', pwd)
%end
if exist('/N/u/hayashis/BigRed2/git', 'dir') == 7
disp('loading karst paths (bigred2)')
addpath(genpath('/N/u/hayashis/BigRed2/git/encode-mexed'))
%addpath(genpath('/N/u/hayashis/BigRed2/git/encode'))
addpath(genpath('/N/u/hayashis/BigRed2/git/vistasoft'))
addpath(genpath('/N/u/hayashis/BigRed2/git/jsonlab'))
end
if exist('/root/git', 'dir') == 7
disp('loading karst paths (jetstream)')
addpath(genpath('/root/git/encode-mexed'))
addpath(genpath('/root/git/vistasoft'))
addpath(genpath('/root/git/jsonlab'))
end
% load my own config.json
config = loadjson('config.json');
[ fe, out ] = life(config);
disp('writing outputs')
save('output_fe.mat','fe', '-v7.3');
fgWrite(out.life.fg, 'output_fg.pdb');
%savejson('w', out.life.w, 'life_fascicle_weights.json');
%savejson('rmse', out.life.rmse, 'life_error.json');
out.life = [];
savejson('out', out, 'life_results.json');
%for ii = 1:length(fh)
% saveas(fh(ii), sprintf('figure%i.png',ii))
%end
disp('all done')
end