-
Notifications
You must be signed in to change notification settings - Fork 0
/
jksbxpostprocess.m
48 lines (39 loc) · 1.11 KB
/
jksbxpostprocess.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
44
%% list of post processing
%% basic information
base_dir = 'D:\TPM\JK';
% mice = {'648','650','653'};
sessions = 1:19;
% mice = {'650'};
mice = {'025','027','030'};
%% split into trials
for mi = 1 : length(mice)
cd([base_dir filesep mice{mi}])
jksbxsplittrial_dir
end
%% alignment
for mi = 1 : length(mice)
cd([base_dir filesep mice{mi}])
jksbxaligndir
jksbxaligndir_smoothing(3,{[mice{mi}, '_010_000'], [mice{mi}, '_009_000'], [mice{mi}, '_008_000']})
end
%% align the whole imaging sessions
% for mi = 1 : length(mice)
% cd([base_dir filesep mice{mi}])
% flist = [];
% for sn = sessions
% flist = [flist;dir([sprintf('%s_%03d_',mice{mi},sn),'*.align'])];
% end
% mg = cell(length(flist),1);
% for i = 1 : length(flist)
% load(flist(i).name,'-mat');
% mg{i} = m;
% end
% [mm, TT] = jkaligncell(mg);
% save([mice{mi}, '_align.mat'], 'mm', 'TT')
% for i = 1 : length(flist)
% load(flist(i).name,'-mat');
% T = T + TT(i,:);
% m = circshift(m,TT(i,:));
% save(flist(i).name,'-mat','m','T')
% end
% end