-
Notifications
You must be signed in to change notification settings - Fork 0
/
neon_analyis_V1full.m
72 lines (62 loc) · 1.74 KB
/
neon_analyis_V1full.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
%%%% neon color fullscreen in V1
%%% extracting stimulus data and spike data and ploting raster, psth and
%%% tuning curve...
clear
tic
%% parameters
%%
data_folder= 'D:\matwork\Data\NEON_V1';
data_folder2='Y:\MPI_EphysData_2020\v1';
mouse_numbers =[ 185 335];
addpath(genpath('D:\matwork\KiloSort'))
addpath(genpath('D:\matwork\npy-matlab'))
addpath(genpath('D:\matwork\spikes'))
addpath(genpath('D:\matwork\NPMK'))
Nchan=32;
for mouse_number=mouse_numbers
%% getting forders for analysis
%%
%%% Kilosort folders
mouse=['M',num2str(mouse_number)]
KS_dirs=cell(2,1);
folders=dir(data_folder);
j=1;
for i=1:length(folders)
if length(folders(i).name)>4 && strcmp(folders(i).name(1:4),mouse)
KS_dirs{j}=fullfile(data_folder,folders(i).name);
j=j+1;
end
end
if mouse_number==185
KS_dirs(6)=[];
KS_dirs(3)=[];
end
%%% BL folders
BL_dirs=cell(2,1);
% folders=dir(fullfile(data_folder2,mouse));
folders=dir(data_folder2);
j=1;
for i=1:length(folders)
if length(folders(i).name)>4 && strcmp(folders(i).name(1:4),mouse)
BL_dirs{j}=fullfile(data_folder2,folders(i).name);
% OE_dirs{j}=fullfile(data_folder2,folders(i).name);
j=j+1;
end
end
%% extracting stimulus data (this part will exrtact data for all the sessions)
%%
%
% for day=1:length(KS_dirs) %% loop for different days
% f_stim_data_blckrck(OE_dirs{day},KS_dirs{day+7},Nchan);
% end
%% extracting spike data (this part will exrtact data for all the sessions)
for day=1:length(KS_dirs) %% loop for different days
f_extract_spike_data_V1full(KS_dirs{day},BL_dirs{day})
end
%% plotting tuning curves
for day=1:length(KS_dirs) %% loop for different days
% f_plot_size_tuning(KS_dirs{day})
f_neon6_tuning_curve_V1full(KS_dirs{day})
end
end
toc