-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlot_Experiment.m
78 lines (75 loc) · 3.01 KB
/
Plot_Experiment.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
73
74
75
76
77
78
%% Setup
% Plot EXPERIMENT_ID.mat file from FinderSpiker
% It states the anlaysis status and make the following plot:
% - Raster of Raw Activity
% - Sorted Raster by Activity
% - Sorted Raster by Changed Groups between conditions
% - Neuronal Ensembles Raster
% - Sorted Neuronal Ensembles Raster
%
% Functions:
% >> Plot_Raster_Ensembles()
% >> plot_activityrate()
% >> plot_activitychange()
% >> Plot_Raster_Ensembles()
%
%% Start
Import_FinderSpiker;
Experiment=Experiment(Experiment~='\'); % NAMES PATCH
%% Script that plots the raster of the Selected OR the Whole Clean raster
if exist('RASTER_Selected_Clean','var')
disp('>>Plotting Selected Raster to Analyze: ')
Plot_Raster_Ensembles(RASTER_Selected_Clean,fs);
CurrentFig=gcf;
CurrentFig.Name=['ID: ',Experiment,' Selected to Analyze'];
CurrentFig.NumberTitle='off';
Label_Condition_Raster(Names_Conditions,R_Condition,fs); % Labels
disp('>>Raster Ready to Analyze.')
% Aski if plots Rate of Activity (RoA)
okbutton = questdlg('Plot Rate of Activity ?');
waitfor(okbutton);
if strcmp('Yes',okbutton)
% Plot RoA ********************************************************
plot_activityrate(R_Condition,Names_Conditions,fs);
% *****************************************************************
end
if numel(R_Condition)>1
% Aski if plots Rate of Activity (RoA)
okbutton = questdlg('Plot Subgroups of Neurons by Change of Activity?');
waitfor(okbutton);
if strcmp('Yes',okbutton)
% Plot Delta RoA Subgroups *************************************
plot_activitychange(R_Condition,Names_Conditions,fs)
% **************************************************************
end
end
elseif exist('RASTER_CONCAT','var')
disp('>>Plotting Clean Raster: ')
Plot_Raster_Ensembles(RASTER_CONCAT,fs);
CurrentFig=gcf;
CurrentFig.Name=['ID: ',Experiment,' Clean Raster'];
CurrentFig.NumberTitle='off';
Label_Condition_Raster(Names_Conditions,Raster_Condition,fs); % Labels
disp('>>Next Step: Select Frames of Raster.')
else
disp('>>Plotting Raster from Automatic Processing ')
Plot_Raster_Ensembles(RASTER_WHOLE_Clean,fs);
CurrentFig=gcf;
CurrentFig.Name=['ID: ',Experiment,' from Automatic Processing'];
CurrentFig.NumberTitle='off';
Label_Condition_Raster(Names_Conditions,RASTER,fs); % Labels
disp('>>Next Step: Inspect Signals: Detected & Undetected.')
fprintf('Execute: \n')
fprintf('>>Detected_Visual_Inspection\n>>Undetected_Visual_Inspection\n')
end
% In case there are Neural Ensemble Analysis
if exist('Features_Condition','var')
disp('>>Neural Ensembles Ready.')
okbutton = questdlg('Plot Neuronal Ensembles & Hebbian Sequence?');
waitfor(okbutton);
if strcmp('Yes',okbutton)
% Plot Ensembles **************************************************
Plot_Neural_Ensembles;
% *****************************************************************
end
end