-
Notifications
You must be signed in to change notification settings - Fork 1
/
pac_pop_scanHfoByPhase.m
49 lines (43 loc) · 2.47 KB
/
pac_pop_scanHfoByPhase.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
% pac_pop_scanLfoPhaseFreq() - scan low-frequency phase
% Author: Makoto Miyakoshi, JSPS/SCCN,INC,UCSD 2012. He likes Pacman Power-Pill Mix.
% History:
% 07/24/2019 Makoto. str2num() changed to str2num().
% 06/24/2013 ver 1.1 by Makoto. Explanatin in GUI renewed.
% 01/15/2013 ver 1.0 by Makoto. Created.
% Copyright (C) 2012 Makoto Miyakoshi, JSPS/SCCN,INC,UCSD;
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
function EEG = pac_pop_scanHfoByPhase(EEG)
userInput = inputgui('title', 'pac_pop_scanLfoPhaseFreq', 'geom', ...
{{2 6 [0 0] [1 1]} {2 7 [1 0] [1 1]} ...
{2 6 [0 1] [1 1]} {2 7 [1 1] [1 1]} ...
{2 6 [0 2] [1 1]} {2 7 [1 2] [1 1]} ...
{2 6 [0 3] [1 1]} {2 7 [1 3] [1 1]} ...
{2 6 [0 4] [1 1]} {2 7 [1 4] [1 1]} ...
{2 6 [0 5] [1 1]} {2 7 [1 5] [1 1]}}, ...
'uilist',...
{{'style' 'text' 'string' 'Phase LFO freq range [loHz hiHz]'} {'style' 'edit' 'string' '0.5 8'}...
{'style' 'text' 'string' 'Amp HFO freq range [loHz hiHz]'} {'style' 'edit' 'string' '100 200'}...
{'style' 'text' 'string' 'HFO amp percentile range [N%]'} {'style' 'edit' 'string' '3'}...
{'style' 'text' 'string' 'Number of Freq bins [N]'} {'style' 'edit' 'string' '10'}...
{'style' 'text' 'string' 'Plot Modulation Index or mean vector length'} {'style' 'popupmenu' 'string' 'mean vector length|Modulation Index' 'value' 1}...
{'style' 'text' 'string' 'Normalize color schema across channels'} {'style' 'checkbox' 'value' 1}});
phaseFreqRange = str2num(userInput{1,1});
ampFreqRange = str2num(userInput{1,2});
HASnumber = str2num(userInput{1,3});
numFreqBins = str2num(userInput{1,4});
plotType = userInput{1,5};
normalizeColor = userInput{1,6};
EEG = pac_scanHfoByPhase(EEG, phaseFreqRange, ampFreqRange, HASnumber, numFreqBins, plotType, normalizeColor);