Skip to content

Commit 29d67c0

Browse files
committed
SPM8 r6313
1 parent 1de68e0 commit 29d67c0

Some content is hidden

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

79 files changed

+405
-170
lines changed

@meeg/sconfounds.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
66

77
% Vladimir Litvak
8-
% $Id: sconfounds.m 4657 2012-02-16 17:15:38Z vladimir $
8+
% $Id: sconfounds.m 5569 2013-07-01 11:10:00Z vladimir $
99

1010
if nargin == 2
11-
meegind = meegchannels(this);
11+
meegind = meegchannels(this, 'MEEG');
1212

1313
[sel1, sel2] = match_str(chanlabels(this, meegind), newsconfounds.label);
1414

Contents.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
% Statistical Parametric Mapping
2-
% Version 5236 (SPM8) 04-Feb-13
2+
% Version 6313 (SPM8) 23-Jan-2015
33
%__________________________________________________________________________
44
% ___ ____ __ __
55
% / __)( _ \( \/ )
@@ -40,9 +40,9 @@
4040
% You should have received a copy of the GNU General Public License along
4141
% with SPM, in spm_LICENCE.man. If not, see <http://www.gnu.org/licenses/>.
4242
%__________________________________________________________________________
43-
% Copyright (C) 1991,1994-2013 Wellcome Trust Centre for Neuroimaging
43+
% Copyright (C) 1991,1994-2015 Wellcome Trust Centre for Neuroimaging
4444

45-
% $Id: Contents.m 5232 2013-02-04 15:15:06Z guillaume $
45+
% $Id: Contents.m 6312 2015-01-23 13:01:57Z guillaume $
4646

4747
%==========================================================================
4848
% PROGRAMMERS NOTE:

README.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ See http://www.fil.ion.ucl.ac.uk/spm/software/spm8/ for details.
4848
Later versions of MATLAB (released after SPM8), will probably
4949
need additional patches in order to run. Once developed, these will
5050
be made available from:
51-
ftp://ftp.fil.ion.ucl.ac.uk/spm/spm8_updates/
51+
http://www.fil.ion.ucl.ac.uk/spm/download/spm8_updates/
5252

5353
With the compiled c-mex files in place, simply prepend the SPM
5454
directory to your MATLAB path to complete the installation. (Type `help
@@ -109,4 +109,4 @@ ________________________________________________________________________
109109
SPM is developed by members and collaborators of the
110110
Wellcome Trust Centre for Neuroimaging
111111

112-
$Id: README.txt 5187 2013-01-17 12:10:06Z guillaume $
112+
$Id: README.txt 5638 2013-09-17 17:39:18Z guillaume $

config/spm_cfg_eeg_inv_headmodel.m

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
% Copyright (C) 2010 Wellcome Trust Centre for Neuroimaging
66

77
% Vladimir Litvak
8-
% $Id: spm_cfg_eeg_inv_headmodel.m 4997 2012-10-12 11:17:08Z vladimir $
8+
% $Id: spm_cfg_eeg_inv_headmodel.m 5988 2014-05-15 12:24:42Z vladimir $
99

1010
D = cfg_files;
1111
D.tag = 'D';
@@ -168,6 +168,8 @@
168168
for i = 1:numel(job.D)
169169
D = spm_eeg_load(job.D{i});
170170

171+
[ok, D] = check(D, '3d');
172+
171173
if ~isfield(D,'inv')
172174
val = 1;
173175
elseif numel(D.inv)<job.val

external/Makefile

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
#
44
# Copyright (C) 2008-2012 Wellcome Trust Centre for Neuroimaging
55
#
6-
# $Id: Makefile 5144 2012-12-20 16:20:49Z guillaume $
6+
# $Id: Makefile 6144 2014-09-01 16:55:31Z guillaume $
77

88
include ../src/Makefile.var
99

1010
FIELDTRIPMEX =\
1111
fieldtrip/src/read_24bit.$(SUF) fieldtrip/src/read_16bit.$(SUF) \
12-
fieldtrip/src/mxSerialize.$(SUF) fieldtrip/src/mxDeserialize.$(SUF) \
1312
fieldtrip/src/ft_getopt.$(SUF) \
1413
\
1514
fieldtrip/src/nanmean.$(SUF) fieldtrip/src/nannumel.$(SUF) \
@@ -38,8 +37,6 @@ distclean: clean bemcp-distclean
3837

3938
install: bemcp-install
4039
$(COPY) fieldtrip/src/read_24bit.$(SUF) fieldtrip/fileio/private/
41-
$(COPY) fieldtrip/src/mxSerialize.$(SUF) fieldtrip/fileio/private/
42-
$(COPY) fieldtrip/src/mxDeserialize.$(SUF) fieldtrip/fileio/private/
4340
$(COPY) fieldtrip/src/read_16bit.$(SUF) fieldtrip/fileio/private/
4441
$(COPY) fieldtrip/src/nanmean.$(SUF) fieldtrip/fileio/private/
4542
$(COPY) fieldtrip/src/nannumel.$(SUF) fieldtrip/fileio/private/
@@ -68,15 +65,12 @@ install: bemcp-install
6865
$(COPY) fieldtrip/src/nannumel.$(SUF) fieldtrip/private/
6966
$(COPY) fieldtrip/src/nansum.$(SUF) fieldtrip/private/
7067
$(COPY) fieldtrip/src/nanvar_base.$(SUF) fieldtrip/private/
71-
$(COPY) fieldtrip/src/mxSerialize.$(SUF) fieldtrip/private/
72-
$(COPY) fieldtrip/src/mxDeserialize.$(SUF) fieldtrip/private/
7368

7469
$(COPY) fieldtrip/src/ft_getopt.$(SUF) fieldtrip/utilities/
7570
$(COPY) fieldtrip/src/nanmean.$(SUF) fieldtrip/utilities/private/
7671
$(COPY) fieldtrip/src/nannumel.$(SUF) fieldtrip/utilities/private/
7772
$(COPY) fieldtrip/src/nansum.$(SUF) fieldtrip/utilities/private/
7873
$(COPY) fieldtrip/src/nanvar_base.$(SUF) fieldtrip/utilities/private/
79-
$(COPY) fieldtrip/src/mxSerialize.$(SUF) fieldtrip/utilities/private/
8074
$(COPY) fieldtrip/src/ptriproj.$(SUF) fieldtrip/utilities/private/
8175
$(COPY) fieldtrip/src/lmoutr.$(SUF) fieldtrip/utilities/private/
8276

external/fieldtrip/connectivity/private/nanmean.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
function y = nanmean(x, dim)
7-
N = sum(~isnan(t), dim);
7+
N = sum(~isnan(x), dim);
88
y = nansum(x, dim) ./ N;
99

10-
end
10+
end

external/fieldtrip/fileio/ft_read_event.m

+13-8
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,19 @@
293293
schan = find(strcmpi(hdr.label,'STATUS'));
294294
sdata = ft_read_data(filename, 'header', hdr, 'dataformat', dataformat, 'begsample', begsample, 'endsample', endsample, 'chanindx', schan);
295295

296-
% find indices of negative numbers
297-
bit24i = find(sdata < 0);
298-
% make number positive and preserve bits 0-22
299-
sdata(bit24i) = bitcmp(abs(sdata(bit24i))-1,24);
300-
% re-insert the sign bit on its original location, i.e. bit24
301-
sdata(bit24i) = sdata(bit24i)+(2^(24-1));
302-
% typecast the data to ensure that the status channel is represented in 32 bits
303-
sdata = uint32(sdata);
296+
try
297+
% find indices of negative numbers
298+
bit24i = find(sdata < 0);
299+
% make number positive and preserve bits 0-22
300+
sdata(bit24i) = bitcmp(abs(sdata(bit24i))-1,24);
301+
% re-insert the sign bit on its original location, i.e. bit24
302+
sdata(bit24i) = sdata(bit24i)+(2^(24-1));
303+
% typecast the data to ensure that the status channel is represented in 32 bits
304+
sdata = uint32(sdata);
305+
catch
306+
% convert to 32-bit integer representation and only preserve the lowest 24 bits
307+
sdata = bitand(int32(sdata), 2^24-1);
308+
end
304309

305310
byte1 = 2^8 - 1;
306311
byte2 = 2^16 - 1 - byte1;
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

external/fieldtrip/fileio/private/nanmean.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
function y = nanmean(x, dim)
7-
N = sum(~isnan(t), dim);
7+
N = sum(~isnan(x), dim);
88
y = nansum(x, dim) ./ N;
99

10-
end
10+
end

external/fieldtrip/forward/private/triangle4pt.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
% written by Christophe Phillips, 2009/01/19
3535
% Cyclotron Research Centre, University of li?ge, belgium
3636
%
37-
% $Id: triangle4pt.m 7123 2012-12-06 21:21:38Z roboos $
37+
% $Id: triangle4pt.m 8447 2013-09-05 17:48:57Z vlalit $
3838

3939
Ns = length(vol.bnd);
4040
for ii=1:Ns % treat each mesh one at a time
@@ -53,7 +53,7 @@
5353
lt(lt==jj) = [];
5454
% list of 3 directly surrounding triangles
5555
lv = tri(lt,:);
56-
lv = setxor(lv(:),tri(jj,:));
56+
lv = setxor(lv(:)',tri(jj,:));
5757
% list of 3 voxels connected by 2 edges to the jj_th triangle.
5858
sph_pnt = pnt([tri(jj,:) lv],:);
5959
[center,radius] = fitsphere(sph_pnt);

external/fieldtrip/ft_defaults.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151
if ~isfield(ft_default, 'trackconfig'), ft_default.trackconfig = 'off'; end % cleanup, report, off
5252
if ~isfield(ft_default, 'checkconfig'), ft_default.checkconfig = 'loose'; end % pedantic, loose, silent
5353
if ~isfield(ft_default, 'checksize'), ft_default.checksize = 1e5; end % number in bytes, can be inf
54-
if ~isfield(ft_default, 'showcallinfo'), ft_default.showcallinfo = 'yes'; end % yes or no, this is used in ft_pre/postamble_provenance
54+
if ~isfield(ft_default, 'showcallinfo'), ft_default.showcallinfo = 'no'; end % yes or no, this is used in ft_pre/postamble_provenance
5555
if ~isfield(ft_default, 'debug'), ft_default.debug = 'no'; end % no, save, saveonerror, display, displayonerror, this is used in ft_pre/postamble_debug
5656

5757
% these options allow to disable parts of the provenance
58-
if ~isfield(ft_default, 'trackcallinfo'), ft_default.trackcallinfo = 'yes'; end % yes or no
58+
if ~isfield(ft_default, 'trackcallinfo'), ft_default.trackcallinfo = 'no'; end % yes or no
5959
if ~isfield(ft_default, 'trackdatainfo'), ft_default.trackdatainfo = 'no'; end % yes or no, this is still under development
6060
if ~isfield(ft_default, 'trackparaminfo'), ft_default.trackparaminfo = 'no'; end % yes or no, this is still under development
6161

-8.26 KB
Binary file not shown.
-8.52 KB
Binary file not shown.
Binary file not shown.
-6.5 KB
Binary file not shown.
Binary file not shown.
-8.17 KB
Binary file not shown.
-8.39 KB
Binary file not shown.
-8.34 KB
Binary file not shown.
-6.5 KB
Binary file not shown.
-7 KB
Binary file not shown.

external/fieldtrip/private/nanmean.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
function y = nanmean(x, dim)
7-
N = sum(~isnan(t), dim);
7+
N = sum(~isnan(x), dim);
88
y = nansum(x, dim) ./ N;
99

10-
end
10+
end

external/fieldtrip/private/triangle4pt.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
% written by Christophe Phillips, 2009/01/19
3535
% Cyclotron Research Centre, University of li?ge, belgium
3636
%
37-
% $Id: triangle4pt.m 7123 2012-12-06 21:21:38Z roboos $
37+
% $Id: triangle4pt.m 8447 2013-09-05 17:48:57Z vlalit $
3838

3939
Ns = length(vol.bnd);
4040
for ii=1:Ns % treat each mesh one at a time
@@ -53,7 +53,7 @@
5353
lt(lt==jj) = [];
5454
% list of 3 directly surrounding triangles
5555
lv = tri(lt,:);
56-
lv = setxor(lv(:),tri(jj,:));
56+
lv = setxor(lv(:)',tri(jj,:));
5757
% list of 3 voxels connected by 2 edges to the jj_th triangle.
5858
sph_pnt = pnt([tri(jj,:) lv],:);
5959
[center,radius] = fitsphere(sph_pnt);

external/fieldtrip/src/nanmean.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
function y = nanmean(x, dim)
7-
N = sum(~isnan(t), dim);
7+
N = sum(~isnan(x), dim);
88
y = nansum(x, dim) ./ N;
99

10-
end
10+
end

external/fieldtrip/statfun/private/nanmean.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
function y = nanmean(x, dim)
7-
N = sum(~isnan(t), dim);
7+
N = sum(~isnan(x), dim);
88
y = nansum(x, dim) ./ N;
99

10-
end
10+
end
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

external/fieldtrip/utilities/private/nanmean.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
function y = nanmean(x, dim)
7-
N = sum(~isnan(t), dim);
7+
N = sum(~isnan(x), dim);
88
y = nansum(x, dim) ./ N;
99

10-
end
10+
end

man/meeg/eeg_imaging.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ \section{Forward computation (\textit{forward})}
9090

9191

9292
\section{Inverse reconstruction}
93-
To get started press the \texttt{Invert} button. The first choice you will see is between \texttt{Imaging}, \texttt{VB-ECD} and \texttt{Beamforming}. For reconstruction based on an empirical Bayesian approach to localize either the evoked response, the evoked power or the induced power, as measured by EEG or MEG press the \texttt{Imaging} button. The other options are explained in greater detail elsewhere.
93+
To get started press the \texttt{Invert} button. The first choice you will see is between \texttt{Imaging}, \texttt{VB-ECD} and \texttt{DCM}. For reconstruction based on an empirical Bayesian approach to localize either the evoked response, the evoked power or the induced power, as measured by EEG or MEG press the \texttt{Imaging} button. The other options are explained in greater detail elsewhere.
9494

9595
If you have trials belonging to more than one condition in your dataset then the next choice you will have is whether to invert all the conditions together or to choose a subset. It is recommended to invert the conditions together if you are planning to later do a statistical comparison between them. If you have only one condition, or after choosing the conditions, you will get a choice between ``Standard'' and ``Custom'' inversion. If you choose ``Standard'' inversion, SPM will start the computation with default settings. These correspond to the multiple sparse priors (MSP) algorithm \cite{karl_msp} which is then applied to the whole input data segment.
9696

matlabbatch/cfg_getfile.m

+8-8
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
% Copyright (C) 2007 Freiburg Brain Imaging
8686

8787
% John Ashburner and Volkmar Glauche
88-
% $Id: cfg_getfile.m 4863 2012-08-27 08:09:23Z volkmar $
88+
% $Id: cfg_getfile.m 6251 2014-10-30 13:58:44Z volkmar $
8989

9090
t = {};
9191
sts = false;
@@ -364,7 +364,7 @@
364364
'units','normalized',...
365365
'Position',posinpanel([0.05+3*cw .5 0.45-3*cw .45],pcntp),...
366366
bf,...
367-
'Callback',@delete,...
367+
'Callback',@(h,e)delete(h),...
368368
'tag','D',...
369369
'ForegroundColor',col3,...
370370
'BackgroundColor',col1,...
@@ -395,7 +395,7 @@
395395
'ForegroundColor',col3,...
396396
'BackgroundColor',col1,...
397397
lf,...
398-
'Callback',@update,...
398+
'Callback',@(ob,ev)update(ob),...
399399
'tag','regexp',...
400400
'String',filt,...
401401
'UserData',sfilt);
@@ -756,7 +756,7 @@ function click_dir_box(lb,varargin)
756756
%=======================================================================
757757
function update(lb,dr)
758758
lb = sib(lb,'dirs');
759-
if nargin<2 || isempty(dr),
759+
if nargin<2 || isempty(dr) || ~ischar(dr)
760760
dr = get(lb,'UserData');
761761
end;
762762
if ~(strcmpi(computer,'PCWIN') || strcmpi(computer,'PCWIN64'))
@@ -1232,7 +1232,7 @@ function editeval(ob,varargin)
12321232
ob = sib(ob, 'EditWindow');
12331233
str = get(ob, 'String');
12341234
if ~isempty(str)
1235-
[out sts] = cfg_eval_valedit(char(str));
1235+
[out,sts] = cfg_eval_valedit(char(str));
12361236
if sts && (iscellstr(out) || ischar(out))
12371237
set(ob, 'String', cellstr(out));
12381238
else
@@ -1248,7 +1248,7 @@ function editeval(ob,varargin)
12481248
function editdone(ob,varargin)
12491249
ob = get(ob,'Parent');
12501250
ob = sib(ob,'EditWindow');
1251-
str = get(ob,'String');
1251+
str = cellstr(get(ob,'String'));
12521252
if isempty(str) || isempty(str{1})
12531253
str = {};
12541254
else
@@ -1266,9 +1266,9 @@ function editdone(ob,varargin)
12661266
end
12671267
filt = getfilt(ob);
12681268
if filt.code >= 0 % filter files, but not dirs
1269-
[p n e] = cellfun(@fileparts, str, 'uniformoutput',false);
1269+
[p,n,e] = cellfun(@fileparts, str, 'uniformoutput',false);
12701270
fstr = strcat(n, e);
1271-
[fstr1 fsel] = do_filter(fstr, filt.ext);
1271+
[fstr1,fsel] = do_filter(fstr, filt.ext);
12721272
str = str(fsel);
12731273
end
12741274
end

matlabbatch/cfg_ui.m

+4-6
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
% Copyright (C) 2007 Freiburg Brain Imaging
2828

2929
% Volkmar Glauche
30-
% $Id: cfg_ui.m 4863 2012-08-27 08:09:23Z volkmar $
30+
% $Id: cfg_ui.m 6128 2014-08-01 16:09:57Z guillaume $
3131

32-
rev = '$Rev: 4863 $'; %#ok
32+
rev = '$Rev: 6128 $'; %#ok
3333

3434
% edit the above text to modify the response to help cfg_ui
3535

@@ -693,8 +693,7 @@ function local_valedit_edit(hObject)
693693
' ', ...
694694
'To clear a value, enter an empty cell ''{}''.', ...
695695
' ', ...
696-
['Accept input with CTRL-RETURN, cancel with ' ...
697-
'ESC.']});
696+
'Leave input box with CTRL-TAB to access buttons.'});
698697
failtxt = {'Input could not be evaluated. Possible reasons are:',...
699698
'1) Input should be a vector or matrix, but is not enclosed in ''['' and '']'' brackets.',...
700699
'2) Input should be a character or string, but is not enclosed in '' single quotes.',...
@@ -716,8 +715,7 @@ function local_valedit_edit(hObject)
716715
' ', ...
717716
'To clear a value, clear the input field and accept.', ...
718717
' ', ...
719-
['Accept input with CTRL-RETURN, cancel with ' ...
720-
'ESC.']});
718+
'Leave input box with CTRL-TAB to access buttons.'});
721719
failtxt = {'Input could not be evaluated.'};
722720
end
723721
sts = false;

matlabbatch/gencode_rvalue.m

+13-4
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
% Copyright (C) 2007 Freiburg Brain Imaging
2626

2727
% Volkmar Glauche
28-
% $Id: gencode_rvalue.m 4864 2012-08-27 13:57:31Z volkmar $
28+
% $Id: gencode_rvalue.m 6128 2014-08-01 16:09:57Z guillaume $
2929

30-
rev = '$Rev: 4864 $'; %#ok
30+
rev = '$Rev: 6128 $'; %#ok
3131

3232
str = {};
3333
sts = true;
@@ -109,8 +109,17 @@
109109
else
110110
sitem = mat2str(item,'class');
111111
end
112-
bsz = max(numel(sitem)+2,100); % bsz needs to be > 100 and larger than string length
113-
str1 = textscan(sitem, '%s', 'delimiter',';', 'bufsize',bsz);
112+
try
113+
if ~verLessThan('matlab', '8.4')
114+
bszopt = {};
115+
else
116+
error('Need bufsize option');
117+
end
118+
catch
119+
bsz = max(numel(sitem)+2,100); % bsz needs to be > 100 and larger than string length
120+
bszopt = {'bufsize', bsz};
121+
end
122+
str1 = textscan(sitem, '%s', 'delimiter',';', bszopt{:});
114123
if numel(str1{1}) > 1
115124
str = str1{1};
116125
else

0 commit comments

Comments
 (0)