Skip to content

Commit

Permalink
Merge pull request #531 from DimitriPapadopoulos/codespell
Browse files Browse the repository at this point in the history
Fix typos found by codespell
  • Loading branch information
arnodelorme authored Oct 10, 2022
2 parents fd47b8a + f93d46d commit 4c256d2
Show file tree
Hide file tree
Showing 33 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion functions/@mmo/checkworkspace.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
end
end

% if subfunction, must be a copie
% if subfunction, must be a copy
if ~isempty(obj.workspace) && strcmpi(stack(end).file, obj.workspace(end).file) && ...
~strcmpi(stack(end).name, obj.workspace(end).name)
% We are within a subfunction. The MMO must have
Expand Down
2 changes: 1 addition & 1 deletion functions/@mmo/subsasgn_old.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
if ~isempty(stack)
% check if we are in a different workspace
if ~isequal(stack, obj.workspace)
% if subfunction, must be a copie
% if subfunction, must be a copy
if ~isempty(obj.workspace) && strcmpi(stack(end).file, obj.workspace(end).file) && ...
~strcmpi(stack(end).name, obj.workspace(end).name)
% We are within a subfunction. The MMO must have
Expand Down
2 changes: 1 addition & 1 deletion functions/adminfunc/eeg_checkset.m
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
% 01-26-02 chandeg events and trial condition format -ad
% 01-27-02 debug when trial condition is empty -ad
% 02-15-02 remove icawinv recompute for pop_epoch -ad & ja
% 02-16-02 remove last modification and test icawinv separatelly -ad
% 02-16-02 remove last modification and test icawinv separately -ad
% 02-16-02 empty event and epoch check -ad
% 03-07-02 add the eeglab options -ad
% 03-07-02 corrected typos and rate/point calculation -ad & ja
Expand Down
2 changes: 1 addition & 1 deletion functions/adminfunc/gethelpvar.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
%
% Outputs:
% vartext - variable text
% varnames - name of the varialbe returned;
% varnames - name of the variable returned;
%
% Notes: see help2html() for file format
%
Expand Down
2 changes: 1 addition & 1 deletion functions/miscfunc/corrimage.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
% percentile of sortvar values (and associated data) before
% computing statistics. Default is [0 100].
% 'align' - [float] same as 'align' parameter of erpimage(). This
% parameter is used to contrain the 'times' parameter so
% parameter is used to constrain the 'times' parameter so
% correlation with data trials containing 0-values (as a
% result of data alignment) are avoided: computing these
% correlations would produce spurious significant results.
Expand Down
2 changes: 1 addition & 1 deletion functions/miscfunc/eegplotgold.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
% yscaling - initial y scaling factor (0 - default is 300)
% range - how many seconds to display in window (0 -> 10)
%
% Note: this version of eegplotgold() reguires that your data matrix
% Note: this version of eegplotgold() requires that your data matrix
% be defined as a global variable before running this routine.
%
% Example: >> global dataname
Expand Down
2 changes: 1 addition & 1 deletion functions/miscfunc/makehtml.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
end

% -------------------------------------------
% scrips which generate a web page for eeglab
% scripts which generate a web page for eeglab
% -------------------------------------------
STYLEHEADER = '<BR><a name="%s"></a><H2>%s</H2>\n';
OPENWIN = [ '<script language="JavaScript"><!--' 10 'function openhelp(fnc){' 10 ...
Expand Down
4 changes: 2 additions & 2 deletions functions/popfunc/eeg_eegrej.m
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@
if 100*differs/length(EEG.event) > 50
db = dbstack;
if length(db) > 1
fprintf(['bug 1971 warning for scritps older than 2017: see https://sccn.ucsd.edu/wiki/EEGLAB_bug1971\n' ]);
fprintf(['bug 1971 warning for scripts older than 2017: see https://sccn.ucsd.edu/wiki/EEGLAB_bug1971\n' ]);
end
end

alllats = [ EEG.event.latency ];
if ~isempty(event2)
otherlatencies = [event2.latency];
if ~isequal(alllats, otherlatencies)
warning([ 'Minor discrepency when recomputing event latency.' 10 '(this will not affect the accuracy of analyses).' 10 'Try to reproduce the problem and send us your dataset' ]);
warning([ 'Minor discrepancy when recomputing event latency.' 10 '(this will not affect the accuracy of analyses).' 10 'Try to reproduce the problem and send us your dataset' ]);
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions functions/popfunc/eeg_laplac.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
%---------------------------------------------------------------------
% internal functions g2 gm_1
function valor=g2(r1,r2,r3,r4)
%g entrega la sumatoria hasta 7 con m=3 de la ec. (2) de la tecnical note del
%g entrega la sumatoria hasta 7 con m=3 de la ec. (2) de la technical note del
%Electrical Geodesics, salvo que esta esta bien

x=cos(r1).*cos(r2).*cos(r3).*cos(r4) + ...
Expand Down Expand Up @@ -134,7 +134,7 @@
valor = 1/4/pi*sum(aux2.*P);
%-----------------------------------------------------
function valor=gm_1(r1,r2,r3,r4)
%g entrega la sumatoria hasta 7 con m=3 de la ec. (2) de la tecnical note del
%g entrega la sumatoria hasta 7 con m=3 de la ec. (2) de la technical note del
%Electrical Geodesics

x=cos(r1).*cos(r2).*cos(r3).*cos(r4) + ...
Expand Down
4 changes: 2 additions & 2 deletions functions/popfunc/pop_biosig.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
% 'overflow' - ['on'|'off'] overflow detection. Default is 'off'
% 'uncalibrated' - ['on'|'off'] import uncalibrated data. Default is 'off'
% 'blockepoch' - ['on'|'off'] force importing continuous data. Default is 'on'
% 'bdfeventmode' - [interger] see bdf2biosig_events function help. Default is 4.
% 'bdfeventmode' - [integer] see bdf2biosig_events function help. Default is 4.
% 'ref' - [integer] channel index or index(s) for the reference.
% Reference channels are not removed from the data,
% allowing easy re-referencing. If more than one
Expand Down Expand Up @@ -147,7 +147,7 @@
{ 'style' 'checkbox' 'String' 'Import as memory mapped file (use if out of memory error)' 'value' option_memmapdata 'tag' 'memorymapped' } ...
{ 'style' 'checkbox' 'String' 'Enable overflow detection' 'value' 0 'tag' 'overflow' } ...
{ 'style' 'checkbox' 'String' 'Import uncalibrated data' 'value' 0 'tag' 'uncalibrated' } ...
{ 'style' 'checkbox' 'string' 'Import EDF+ anotations (try also mexSLOAD below)' 'value' 1 'enable' 'on' 'tag' 'importannot' } ...
{ 'style' 'checkbox' 'string' 'Import EDF+ annotations (try also mexSLOAD below)' 'value' 1 'enable' 'on' 'tag' 'importannot' } ...
{ 'style' 'checkbox' 'string' 'Import using alternative BIOSIG method (mexSLOAD)' 'value' 0 'callback' checkmex 'tag' 'importmex' } };
geom = { [3 1] [3 1] [3 1] [3 1] [1] [1] [1] [1] [1] [1] [1] };

Expand Down
2 changes: 1 addition & 1 deletion functions/popfunc/pop_chanevent.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
% at each time point (returning 1 if the data channel value
% is larger than 3, and 0 otherwise). You may also use
% any function (Ex: 'myfunction(X)'). If an equal character
% is not present, this function preprend 'X=' to your
% is not present, this function prepend 'X=' to your
% expression before evaluating it. Otherwise it just
% evaluate the expression. For example, one may use
% 'if X(1)>100,X(1)=0;end; X(find(X>100))=X(find(X>100)-1);'
Expand Down
8 changes: 4 additions & 4 deletions functions/popfunc/pop_fusechanrej.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,17 @@
if length(dats{index}) == 1
TMPALLEEG = EEG(dats{index}(1));
if ~isempty(TMPALLEEG(1).session)
fprintf('Skipping selecting common channels accross datasets for subject %s session %s (only 1 dataset)\n', TMPALLEEG(1).subject, num2str(TMPALLEEG(1).session));
fprintf('Skipping selecting common channels across datasets for subject %s session %s (only 1 dataset)\n', TMPALLEEG(1).subject, num2str(TMPALLEEG(1).session));
else
fprintf('Skipping selecting common channels accross datasets for subject %s (only 1 dataset)\n', TMPALLEEG(1).subject);
fprintf('Skipping selecting common channels across datasets for subject %s (only 1 dataset)\n', TMPALLEEG(1).subject);
end
else
TMPALLEEG = EEG(dats{index});
commonChans = myintersect(TMPALLEEG.chanlocs);
if ~isempty(TMPALLEEG(1).session)
fprintf('Selecting common channels accross datasets for subject %s session %s ***************\n', TMPALLEEG(1).subject, num2str(TMPALLEEG(1).session));
fprintf('Selecting common channels across datasets for subject %s session %s ***************\n', TMPALLEEG(1).subject, num2str(TMPALLEEG(1).session));
else
fprintf('Selecting common channels accross datasets for subject %s ***************\n', TMPALLEEG(1).subject);
fprintf('Selecting common channels across datasets for subject %s ***************\n', TMPALLEEG(1).subject);
end
for iSet = 1:length(TMPALLEEG)
if length(commonChans) ~= TMPALLEEG(iSet).nbchan
Expand Down
6 changes: 3 additions & 3 deletions functions/popfunc/pop_newtimef.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
% "Sub-epoch time limits" - [edit box] sub epochs may be extracted (note that
% this function aims at plotting data epochs not continuous data).
% You may select the new epoch limits in this edit box.
% "Use n time points" - [muliple choice list] this is the number of time
% "Use n time points" - [multiple choice list] this is the number of time
% points to use for the time-frequency decomposition. The more
% time points, the longer the time-frequency decomposition
% takes to compute.
Expand All @@ -25,7 +25,7 @@
% of limits, you may also enter a sequence of frequencies. For
% example to compute the time-frequency decomposition at all
% frequency between 5 and 50 hertz with 1 Hz increment, enter "1:50"
% "Use limits, padding n" - [muliple choice list] "using limits" means
% "Use limits, padding n" - [multiple choice list] "using limits" means
% to use the upper and lower limits in "Frequency limits" with
% a specific padding ratio (padratio argument of newtimef).
% The last option "use actual frequencies" forces newtimef to
Expand All @@ -35,7 +35,7 @@
% frequencies. Note that this is only relevant if you specify
% frequency limits (in case you specify actual frequencies,
% this parameter is ignored).
% "Use divisive baseline" - [muliple choice list] there are two types of
% "Use divisive baseline" - [multiple choice list] there are two types of
% baseline correction, additive (the baseline is subtracted)
% or divisive (the data is divided by the baseline values).
% The choice is yours. There is also the option to perform
Expand Down
2 changes: 1 addition & 1 deletion functions/popfunc/pop_rejchan.m
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
indFiltered = find(mean(measure) < -20);
if ~isempty(indFiltered) && indFiltered(1) > 11,
measure = measure(:,1:indFiltered(1)-10);
myfprintf('Removing spectrum data below -20dB (most likelly filtered out)\n');
myfprintf('Removing spectrum data below -20dB (most likely filtered out)\n');
end
meanSpec = mean(measure);
stdSpec = std( measure);
Expand Down
2 changes: 1 addition & 1 deletion functions/popfunc/pop_reref.m
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
newLabelPos = strmatch(oldLabel, { newchanlocs.labels }, 'exact');

if length(newLabelPos) > 1
warning('More than one match for specified reference channel; First one selected. This may cause eratic behavior. If the 2 channels are identical, delete one of them.');
warning('More than one match for specified reference channel; First one selected. This may cause erratic behavior. If the 2 channels are identical, delete one of them.');
end
if ~isempty( newLabelPos )
icachansind(i) = newLabelPos(1);
Expand Down
4 changes: 2 additions & 2 deletions functions/sigprocfunc/mri3dplot.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
% Default is 'on'.
% 'mixfact' - [float] factor for mixing the background image with the
% array3d information. Default is 0.5.
% 'mixmode' - ['add'|'overwrite'] 'add' will allow for trasnparency
% 'mixmode' - ['add'|'overwrite'] 'add' will allow for transparency
% while 'overwrite' will preserve the original MRI image
% and overwrite the pixel showind density changes.
%
Expand Down Expand Up @@ -406,7 +406,7 @@
maxdens = max(prob3d(:));
ncolors = size(g.cmap,1);

prob3d = round((prob3d-g.cmin)/(g.cmax - g.cmin)*(ncolors-1))+1; % project desnity image into the color space: [1:ncolors]
prob3d = round((prob3d-g.cmin)/(g.cmax - g.cmin)*(ncolors-1))+1; % project density image into the color space: [1:ncolors]
prob3d( find(prob3d > ncolors) ) = ncolors;
prob3d( find(prob3d < 1)) = 1; % added by Makoto
newprob3d = zeros(size(prob3d,1), size(prob3d,2), size(prob3d,3), 3);
Expand Down
2 changes: 1 addition & 1 deletion functions/sigprocfunc/plotsphere.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
% 'colormap' - [real] sphere colormap { default: jet }
%
% Output:
% handle - sphere graphic handle(s). If projected sphere are ploted
% handle - sphere graphic handle(s). If projected sphere are plotted
% handles of plotted projected spheres are also returned.
%
% Example:
Expand Down
2 changes: 1 addition & 1 deletion functions/sigprocfunc/readlocs.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
% coordinates, import either in EEGLAB format (nose pointing toward +X).
% This may not always be possible since EEGLAB might not be able to
% determine the nose direction for scanned electrode files. 'native' import
% original carthesian coordinates (user can then specify the position of
% original cartesian coordinates (user can then specify the position of
% the nose when calling the topoplot() function; in EEGLAB the position
% of the nose is stored in the EEG.chaninfo structure). {default 'eeglab'}
% 'format' - [cell array] Format of a 'custom' channel location file (see above).
Expand Down
2 changes: 1 addition & 1 deletion functions/sigprocfunc/readneurodat.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
% Outputs:
% CHANLOCS - [structure] EEGLAB channel location data structure. See
% help readlocs()
% labels - [cell arrya] channel labels
% labels - [cell array] channel labels
% theta - [float array]array containing 3-D theta angle electrode
% position (in degree)
% phi - [float array]array containing 3-D phi angle electrode
Expand Down
10 changes: 5 additions & 5 deletions functions/sigprocfunc/spectopo.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
% 'blckhn' = [integer] Parameter to scale the windows length when Blackman-Harris
% windows is used in 'wintype' {default: 2}
% 'reref' = ['averef'|'off'] convert data to average reference {default: 'off'}
% 'mapnorm' = [float vector] If 'data' contain the activity of an independant
% 'mapnorm' = [float vector] If 'data' contain the activity of an independent
% component, this parameter should contain its scalp map. In this case
% the spectrum amplitude will be scaled to component RMS scalp power.
% Useful for comparing component strengths {default: none}
Expand Down Expand Up @@ -72,7 +72,7 @@
% 'icamode' = ['normal'|'sub'] in 'sub' mode, instead of computing the spectra of
% individual ICA components, the function computes the spectrum of
% the data minus their contributions {default: 'normal'}
% 'icamaps' = [integer array] force plotting of selected ICA compoment maps
% 'icamaps' = [integer array] force plotting of selected ICA component maps
% {default: [] = the 'nicamaps' largest contributing components}.
% 'icawinv' = [float array] inverse component weight or mixing matrix. Normally,
% this is computed by inverting the ICA unmixing matrix 'weights' (above).
Expand Down Expand Up @@ -422,7 +422,7 @@
if strcmp(g.memory, 'high') && strcmp(g.icamode, 'normal')
myfprintf(g.verbose, 'Computing component spectra: ')
[compeegspecdB freqs] = spectcomp( newweights*data(:,:), frames, srate, epoch_subset, g);
else % in case out of memory error, multiply conmponent sequencially
else % in case out of memory error, multiply conmponent sequentially
if strcmp(g.icamode, 'sub') && ~isempty(g.plotchan) && g.plotchan == 0
% scan all electrodes
myfprintf(g.verbose, 'Computing component spectra at each channel: ')
Expand Down Expand Up @@ -695,7 +695,7 @@
[realpos(index) allaxuse] = closestplot( freqnormpos, allaxcoords, allaxuse );
end

% put the channel plot a liitle bit higher
% put the channel plot a little bit higher
tmppos = get(headax(realpos(1)), 'position');
tmppos(2) = tmppos(2)+0.04;
set(headax(realpos(1)), 'position', tmppos);
Expand Down Expand Up @@ -918,7 +918,7 @@ function plotcolbar(g)

if ~usepwelch
myfprintf(g.verbose, '\nSignal processing toolbox (SPT) absent: spectrum computed using the pwelch()\n');
myfprintf(g.verbose, 'function from Octave which is suposedly 100%% compatible with the Matlab pwelch function\n');
myfprintf(g.verbose, 'function from Octave which is supposedly 100%% compatible with the Matlab pwelch function\n');
end
myfprintf(g.verbose,' (window length %d; fft length: %d; overlap %d):\n', winlength, fftlength, g.overlap);

Expand Down
2 changes: 1 addition & 1 deletion functions/sigprocfunc/transformcoords.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
% pitch roll yaw rotation
% -----------------------
% pitch (x-axis); roll = y axis rotation; yaw = z axis
% see http://bishopw.loni.ucla.edu/AIR5/homogenous.html
% see http://bishopw.loni.ucla.edu/AIR5/homogeneous.html
cp = cos(pitch); sp = sin(pitch);
cr = cos(roll); sr = sin(roll);
cy = cos(yaw); sy = sin(yaw);
Expand Down
6 changes: 3 additions & 3 deletions functions/statistics/statcond.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
% 'variance' = ['homegenous'|'inhomogenous'] this option is exclusively
% for parametric statistics using unpaired t-test. It allows
% to compute a more accurate value for the degree of freedom
% using the formula for inhomogenous variance (see
% using the formula for inhomogeneous variance (see
% ttest2_cell function). Default is 'inhomegenous'.
% 'surrog' = surrogate data array (see output).
% 'stats' = F- or T-value array (see output).
Expand Down Expand Up @@ -559,11 +559,11 @@

% compute t-test
% -------------------
function [t, df] = ttest_cell_select( res, paired, homogenous)
function [t, df] = ttest_cell_select( res, paired, homogeneous)
if strcmpi(paired,'on')
[t, df] = ttest_cell( res{1}, res{2});
else
[t, df] = ttest2_cell( res{1}, res{2}, homogenous);
[t, df] = ttest2_cell( res{1}, res{2}, homogeneous);
end

% function to compute the number of dimensions
Expand Down
20 changes: 10 additions & 10 deletions functions/statistics/ttest2_cell.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
% a,b = data consisting of UNPAIRED arrays to be compared. The last
% dimension of the data array is used to compute the t-test.
% 'inhomogenous' = use computation for the degree of freedom using
% inhomogenous variance. By default the computation of
% the degree of freedom is done with homogenous
% inhomogeneous variance. By default the computation of
% the degree of freedom is done with homogeneous
% variances.
%
% Outputs:
Expand All @@ -36,7 +36,7 @@
%
% Author: Arnaud Delorme, SCCN/INC/UCSD, La Jolla, 2005
% (thank you to G. Rousselet for providing the formula for
% inhomogenous variances).
% inhomogeneous variances).
%
% Reference:
% Schaum's outlines in statistics (3rd edition). 1999. Mc Graw-Hill.
Expand Down Expand Up @@ -76,19 +76,19 @@
return;
end

homogenous = 'homogenous';
homogeneous = 'homogeneous';
if nargin > 1 && ischar(b)
homogenous = b;
homogeneous = b;
end
if nargin > 2 && ischar(c)
homogenous = c;
homogeneous = c;
end
if iscell(a),
b = a{2};
a = a{1};
end
if ~strcmpi(homogenous, 'inhomogenous') && ~strcmpi(homogenous, 'homogenous')
error('Value for homogenous parameter can only be ''homogenous'' or ''inhomogenous''');
if ~strcmpi(homogeneous, 'inhomogenous') && ~strcmpi(homogeneous, 'homogeneous')
error('Value for homogeneous parameter can only be ''homogeneous'' or ''inhomogenous''');
end

nd = myndims(a);
Expand All @@ -97,8 +97,8 @@
meana = mymean(a, nd);
meanb = mymean(b, nd);

if strcmpi(homogenous, 'inhomogenous')
% inhomogenous variance from Howel, 2009, "Statistical Methods for Psychology"
if strcmpi(homogeneous, 'inhomogenous')
% inhomogeneous variance from Howel, 2009, "Statistical Methods for Psychology"
% thank you to G. Rousselet for providing these formulas
m = meana - meanb;
s1 = var(a,0,nd) ./ na;
Expand Down
Loading

0 comments on commit 4c256d2

Please sign in to comment.