-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHeRunner.asv
47 lines (38 loc) · 1.04 KB
/
HeRunner.asv
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
clear all;
fname ='data.json';
str = fileread(fname)
data = jsondecode(str);
myDir=data.rootdir;
rootname=data.rootname
d=dir(myDir)
u=Utils;
%%
TransveraliumBlur=data.TransveraliumBlur;
%% Produce the corrected spectra
isFirst=1;
for i=1:length(d)
if(d(i).isdir && ~ismember({d(i).name},{'.','..'}))
disp(strcat(d(i).name,' is ok'));
currentDir=strcat(myDir,'\/',d(i).name);
destDir = strcat(currentDir,'\/converted')
if ~exist(destDir, 'dir')
mkdir(destDir);
end
u.SHGpreProcess(currentDir,isFirst,TransveraliumBlur,destDir);
isFirst=0;
end
end
%% Produce the maps
isFirst=1;
for i=1:length(d)
if(d(i).isdir && ~ismember({d(i).name},{'.','..'}))
disp(strcat(d(i).name,' is ok'));
currentDir=strcat(myDir,'\/',d(i).name,'\/converted');
destDir = strcat(currentDir,'\/cubes')
if ~exist(destDir, 'dir')
mkdir(destDir);
end
u.SHGmapper(currentDir,isFirst,destDir,d(i).name);
isFirst=0;
end
end