Skip to content

Commit 396d741

Browse files
committed
Merge remote-tracking branch 'upstream/master'
Conflicts: utilities/ft_datatype_sens.m
2 parents 3cf230c + 856e702 commit 396d741

File tree

153 files changed

+2486
-978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+2486
-978
lines changed

contrib/nutmegtrip/private/nmt_ts_intervalpower.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function fun = nmt_ts_intervalpower(fun,meantype);
1+
function fun = nmt_ts_intervalpower(fun,meantype)
22
% when time interval is selected, calculate desired representation of interval power
33
switch(meantype)
44
case 'msq' % mean power
@@ -10,4 +10,4 @@
1010
case 'mean' % simple average
1111
fun = mean(fun,3);
1212
fun = mean(fun,2);
13-
end
13+
end

contrib/spike/private/cluster_ward.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function [grootte,ordening] = cluster(realdist,optie,absoluut,aantal);
1+
function [grootte,ordening] = cluster(realdist,optie,absoluut,aantal)
22

33
% CLUSTER_WARD Hierarchical cluster algorithm
44
%

contrib/spike/private/preproc.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,11 @@
270270
if ~strcmp(cfg.montage, 'no') && ~isempty(cfg.montage)
271271
% this is an alternative approach for rereferencing, with arbitrary complex linear combinations of channels
272272
tmp.trial = {dat};
273+
tmp.time = {time};
273274
tmp.label = label;
274-
tmp = ft_apply_montage(tmp, cfg.montage, 'feedback', 'none');
275-
dat = tmp.trial{1};
276-
label = tmp.label;
275+
tmp = ft_apply_montage(tmp, cfg.montage, 'feedback', 'none');
276+
dat = tmp.trial{1}; % the number of channels can have changed
277+
label = tmp.label; % the channels can be different than the input channel labels
277278
clear tmp
278279
end
279280

engine/private/ft_platform_supports.m

Lines changed: 58 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
case 'onCleanup'
5757
tf = is_octave() || matlabversion(7.8, Inf);
58-
58+
5959
case 'alim'
6060
tf = is_matlab();
6161

@@ -76,15 +76,15 @@
7676
case 'stats'
7777
root_dir=fileparts(which('ft_defaults'));
7878
external_stats_dir=fullfile(root_dir,'external','stats');
79-
79+
8080
% these files are only used by other functions in the external/stats
8181
% directory
8282
exclude_mfiles={'common_size.m',...
83-
'iscomplex.m',...
84-
'lgamma.m'};
85-
83+
'iscomplex.m',...
84+
'lgamma.m'};
85+
8686
tf = has_all_functions_in_dir(external_stats_dir,exclude_mfiles);
87-
87+
8888
case 'program_invocation_name'
8989
% Octave supports program_invocation_name, which returns the path
9090
% of the binary that was run to start Octave
@@ -120,16 +120,16 @@
120120

121121
case 'urlread-timeout'
122122
tf = is_matlab() && matlabversion('2012b',Inf);
123-
123+
124124
case 'griddata-vector-input'
125125
tf = is_matlab();
126-
126+
127127
case 'griddata-v4'
128128
tf = is_matlab() && matlabversion('2009a',Inf);
129129

130130
case 'uimenu'
131131
tf = is_matlab();
132-
132+
133133
otherwise
134134
error('unsupported value for first argument: %s', what);
135135

@@ -163,19 +163,19 @@
163163
function tf = has_all_functions_in_dir(in_dir, exclude_mfiles)
164164
% returns true if all functions in in_dir are already provided by the
165165
% platform
166-
m_files=dir(fullfile(in_dir,'*.m'));
167-
n=numel(m_files);
166+
m_files=dir(fullfile(in_dir,'*.m'));
167+
n=numel(m_files);
168168

169-
for k=1:n
170-
m_filename=m_files(k).name;
171-
if isempty(which(m_filename)) && ...
172-
isempty(strmatch(m_filename,exclude_mfiles))
173-
tf=false;
174-
return;
175-
end
169+
for k=1:n
170+
m_filename=m_files(k).name;
171+
if isempty(which(m_filename)) && ...
172+
isempty(strmatch(m_filename,exclude_mfiles))
173+
tf=false;
174+
return;
176175
end
176+
end
177177

178-
tf=true;
178+
tf=true;
179179

180180
end % function
181181

@@ -253,46 +253,47 @@
253253
inInterval = orderedComparison(minMajor, minMinor, maxMajor, maxMinor, major, minor);
254254
end
255255

256-
function [year, ab] = parseMatlabRelease(str)
257-
if (str == Inf)
258-
year = Inf; ab = Inf;
259-
elseif (str == -Inf)
260-
year = -Inf; ab = -Inf;
261-
else
262-
year = str2num(str(1:4));
263-
ab = str(5);
264-
end
265-
end
256+
end % function
266257

267-
function [major, minor] = parseMatlabVersion(ver)
268-
if (ver == Inf)
269-
major = Inf; minor = Inf;
270-
elseif (ver == -Inf)
271-
major = -Inf; minor = -Inf;
272-
elseif (isnumeric(ver))
273-
major = floor(ver);
274-
minor = int8((ver - floor(ver)) * 10);
275-
else % ver is string (e.g. '7.10'), parse accordingly
276-
[major, rest] = strtok(ver, '.');
277-
major = str2num(major);
278-
minor = str2num(strtok(rest, '.'));
279-
end
280-
end
258+
function [year, ab] = parseMatlabRelease(str)
259+
if (str == Inf)
260+
year = Inf; ab = Inf;
261+
elseif (str == -Inf)
262+
year = -Inf; ab = -Inf;
263+
else
264+
year = str2num(str(1:4));
265+
ab = str(5);
266+
end
267+
end % function
268+
269+
function [major, minor] = parseMatlabVersion(ver)
270+
if (ver == Inf)
271+
major = Inf; minor = Inf;
272+
elseif (ver == -Inf)
273+
major = -Inf; minor = -Inf;
274+
elseif (isnumeric(ver))
275+
major = floor(ver);
276+
minor = int8((ver - floor(ver)) * 10);
277+
else % ver is string (e.g. '7.10'), parse accordingly
278+
[major, rest] = strtok(ver, '.');
279+
major = str2num(major);
280+
minor = str2num(strtok(rest, '.'));
281+
end
282+
end % function
281283

282284
% checks if testA is in interval (lowerA,upperA); if at edges, checks if testB is in interval (lowerB,upperB).
283-
function inInterval = orderedComparison(lowerA, lowerB, upperA, upperB, testA, testB)
284-
if (testA < lowerA || testA > upperA)
285-
inInterval = false;
286-
else
287-
inInterval = true;
288-
if (testA == lowerA)
289-
inInterval = inInterval && (testB >= lowerB);
290-
end
291-
292-
if (testA == upperA)
293-
inInterval = inInterval && (testB <= upperB);
294-
end
295-
end
285+
function inInterval = orderedComparison(lowerA, lowerB, upperA, upperB, testA, testB)
286+
if (testA < lowerA || testA > upperA)
287+
inInterval = false;
288+
else
289+
inInterval = true;
290+
if (testA == lowerA)
291+
inInterval = inInterval && (testB >= lowerB);
292+
end
293+
294+
if (testA == upperA)
295+
inInterval = inInterval && (testB <= upperB);
296296
end
297+
end
298+
end % function
297299

298-
end % function

external/dipoli/loadama.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function [ama] = loadama(filename);
1+
function [ama] = loadama(filename)
22

33
% LOADAMA read an inverted A-matrix and associated geometry information
44
% from an ama file that was written by Tom Oostendorp's DIPOLI
Binary file not shown.

external/neurone/Version History.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
NeurOne to EEGLAB data import plugin
2+
Mega Electronics
3+
4+
Version 1.0.3.4 (2016-06-17)
5+
- Bug fix in readneuroneevents.m: wrong file ID "fileIdEvents" fixed.
6+
- New feature: Support for events.bin revisions up to 6.
7+
8+
Version 1.0.3.3 (2015-05-28)
9+
- New feature: Support for events.bin revisions up to 4.
10+
11+
Version 1.0.3.2 (2013-04-04)
12+
- New feature: A warning is displayed instead of an error when an unknown filetype revision is found.
13+
14+
Version 1.0.3.1 (2012-06-18)
15+
- New feature: The reader is now able to read measurements with events.bin revision up to 2.
16+
17+
Version 1.0.3.0 (2012-01-13)
18+
- First release
19+
20+
Version 1.0.2.0 (2011-12-22)
21+
- Modifications in 'readneuronedata.m'. When all channels are to be read, the function
22+
will read the binary data without a loop to shorten the processing time.
23+
- The numerical data is stored as double-precision floating point (double) by default.
24+
25+
Version 1.0.1.2 (2011-12-21)
26+
- Fixed an error which occurred when the numerical data was divided into
27+
multiple binary files.
28+
- Added a progress indicator in the readneuronedata function.
29+
30+
Version 1.0.1.1 (2011-12-11)
31+
- Improved event readability. See help readneuroneevents for the new event structure.
32+
- readneuronedata.m re-created so that one channel will be read at a time.
33+
- Updated all m-file headers.
34+
- Fixed some other minor errors.
35+
36+
Version 1.0.1.0 (2011-11-28)
37+
- First version of the plugin.

external/neurone/eegplugin_neurone.m

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
% eegplugin_neurone() - EEGLAB plugin to import data from a NeurOne device.
2+
%
3+
% Usage:
4+
% >> eegplugin_neurone(fig,try_strings,catch_strings)
5+
%
6+
% Inputs:
7+
% fig - [integer] handle to EEGLAB figure
8+
% try_strings - [struct] "try" strings for menu callbacks.
9+
% catch_strings - [struct] "catch" strings for menu callbacks.
10+
%
11+
% NeurOne data import plugin consists of the following files:
12+
% pop_readneurone.m
13+
% guireadneurone.m
14+
% guireadneurone.fig
15+
% readneurone.m
16+
% readneuronedata.m
17+
% readneuroneevents.m
18+
% neurone_logo.png
19+
% mega_gradient_edit.png
20+
%
21+
% This plugin was created according to the instructions provided by the
22+
% creators of EEGLAB. These instructions can be found e.g. from the website:
23+
% http://sccn.ucsd.edu/wiki/A07:_Contributing_to_EEGLAB
24+
%
25+
% Current version: 1.0.3.4 (2016-06-17)
26+
% Author: Mega Electronics
27+
28+
function vers = eegplugin_neurone(fig,try_strings,catch_strings)
29+
30+
vers='NeurOne data import 1.0.3.4';
31+
32+
% Check the number of input arguments
33+
if nargin < 3
34+
error('Not enough input arguments.');
35+
end
36+
37+
% Add plugin folder to path
38+
if ~exist('pop_readneurone.m')
39+
path=which('eegplugin_neurone.m');
40+
[path filename]=fileparts(path);
41+
path=[path filesep];
42+
addpath([path version] );
43+
end
44+
45+
% Find the 'Import data' -menu
46+
importmenu=findobj(fig,'tag','import data');
47+
48+
% Construct command
49+
cmd = [try_strings.no_check '[EEG LASTCOM]=pop_readneurone;' catch_strings.new_and_hist];
50+
51+
% Create the menu for NeurOne import
52+
uimenu(importmenu,'label','From a NeurOne file (.ses)',...
53+
'Callback',cmd,'separator','on');
54+

external/neurone/guireadneurone.fig

34.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)