forked from lauradriscoll/pre_process_shared
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconvert_aligned_data.m
33 lines (28 loc) · 1.37 KB
/
convert_aligned_data.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
% convert trial aligned data to v7.3 (h5py)
%masterPath = "/Volumes/Aaron's 5TB HD/ppc/2P_data/";
masterPath = "/Volumes/Aaron's PPC/ppc/2P_data/";
outputPath = "/Users/akuan/Dropbox (HMS)/htem_team/projects/PPC_project/2P_data/trialAlignedData/";
mouse = 'LD187';
%my_sessions = {'LD187_141216', 'LD187_141215', 'LD187_141214', 'LD187_141213'};
my_sessions = {'LD187_141216','LD187_141215','LD187_141214','LD187_141213','LD187_141212',...
'LD187_141211','LD187_141209','LD187_141208','LD187_141207','LD187_141206'};
for i = 1:length(my_sessions)
session = my_sessions{i};
input = fullfile(masterPath, 'code_workspace',mouse,'syncedData',[session '.mat']);
disp(input)
trialAlignedData = load(input).trialAlignedData;
output = fullfile(outputPath, [session '.mat']);
disp(output)
save(output, 'trialAlignedData', '-v7.3');
end
%%
%{
trialAlignedData.SNR_raw = snr;
save(fullfile(output_dir,session),'trialAlignedData');
end
%% Save data as .mat
output_dir = fullfile(masterPath, 'code_workspace',mouse,'selectMetrics');
save(fullfile(output_dir,session),'AUC_fullTrial', 'AUC_blocks', 'RL_fullTrial', 'RL_blocks',...
'selectivity_AUC','selectivity_AUC_blocks','selectivity_RL','selectivity_RL_blocks',...
'choiceMI','choiceMI_max','choiceMI_max_idx','maxMI_sig','choiceMI_prctile','choiceMI_pref','-v7.3');
%}