-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBpodImager_checkFullModel.asv
43 lines (29 loc) · 1.32 KB
/
BpodImager_checkFullModel.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
BpodImager_checkFullModel
%% loop through data and get full model results
for iMod = 1:3
if iMod == 1
% GFP data
[dataOverview, ~, ~, ~, ~, ~, ~, cPath] = delayDecRecordings_GFP;
dataOverview = dataOverview(ismember(dataOverview(:,4), 'GFP'), :);
elseif iMod == 2
% camK data
[dataOverview, ~, ~, ~, ~, ~, ~, cPath] = delayDecRecordings_GFP;
dataOverview = dataOverview(ismember(dataOverview(:,4), 'gcamp'), :);
elseif iMod == 3
%ai93 data
[dataOverview, ~, ~, ~, ~, ~, ~, ~] = delayDecRecordings;
cPath = 'U:\smusall\BpodImager\Animals\';
end
for iAnimal = 1 : size(dataOverview,1)
opts.fPath = [cPath dataOverview{iAnimal,1} filesep 'SpatialDisc' filesep dataOverview{iAnimal,3} filesep];
disp(opts.fPath);
load([opts.fPath filesep 'mask.mat']);
load([opts.fPath filesep 'predVariance' filesep 'shCurrent' filesep 'fullCorr.mat']);
corrMaps{iMod}(:,:,iAnimal) = arrayShrink(cMap,mask,'split');
avgCorr{iMod}(iAnimal) = nanmean(cMap(:).^2);
load([opts.fPath filesep 'predVariance' filesep 'shCurrent' filesep 'motorCorr.mat']);
motorCott{iMod}(:,:,iAnimal) = arrayShrink(cMap,mask,'split');
end
end
%% show some results
% for i