Changes
Page history
adlofts created page: postprocessingscript
authored
Apr 12, 2017
by
Andrew Lofts
Show whitespace changes
Inline
Side-by-side
postprocessingscript.md
View page @
8454e373
...
...
@@ -120,6 +120,31 @@ For Example:
```
data_sd_ch <135x1517> ``` is the matrix containing the results of the standard deviation test to find comically bad channels.
```c_data_sd_ch <135x1517> ``` is the corresponding flag matrix flagging 1 where the standard deviation was above the ```sd_chan_z``` critical value.
```
marks.chan_info(2).flags
``` is the corresponding channels marks where the channel had more % flagged then the ```
sd_chan_p
``` critical value.
This pattern matches for most of the marks.
**Pie Chart Example**
Below is the code for the pie chart separating the channel types.
```
matlab
% Pie Chart
c1 = length(EEG.marks.chan_info(1).flags); % Collect Number of Epochs
c2 = length(find(EEG.marks.chan_info(2).flags)); % Collect the Number of Epochs flagged for mark 2 (ch_sd)
c3 = length(find(EEG.marks.chan_info(3).flags)); % Collect the Number of Epochs flagged for mark 3 (low_r)
c4 = length(find(EEG.marks.chan_info(4).flags)); % Collect the Number of Epochs flagged for mark 4 (bridge)
cm = length(find(EEG.marks.chan_info(1).flags)); % Collect the Number of Epochs flagged for mark 1 (manual)
c1 = c1-cm; % Update c1 to be the Number of Epochs not flagged for mark 1 (manual)
cpie = [c1 c2 c3 c4]; % Create cpie containing all of the other c values
figure; % Generate a figure window - nothing plotted yet
explode = [1 0 0 0]; % Set up input - Make c1 segmented out of the pie
ax1 = subplot(1,2,1); %Set up input - Make the pie chart the first plot of a of a 1x2 subplot grid
labels = {'Remaining Channels','Comically Bad','Low Correlation','Bridged'}; %Set up input - Create cell array of labels corresponding to c values
pie(ax1,cpie,explode,labels); % Plot pie graph using parameters just created.
colormap(jet); % Set the color scheme to
*jet*
title('Data Channel Classification'); % Set the title of the chart
```
**Calculation->Flag->Mark/Criteria Plot Example**
We are currently working on this section of the Wiki.
...
...
...
...