Skip to content

Commit

Permalink
made the randomseed pre/postamble more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoostenveld committed Aug 25, 2018
1 parent b3eb874 commit fac522c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 2 additions & 0 deletions ft_freqstatistics.m
Expand Up @@ -79,6 +79,7 @@
ft_preamble loadvar varargin
ft_preamble provenance varargin
ft_preamble trackconfig
ft_preamble randomseed

% the ft_abort variable is set to true or false in ft_preamble_init
if ft_abort
Expand Down Expand Up @@ -219,6 +220,7 @@

% do the general cleanup and bookkeeping at the end of the function
ft_postamble debug
ft_postamble randomseed
ft_postamble trackconfig
ft_postamble previous varargin
ft_postamble provenance stat
Expand Down
2 changes: 2 additions & 0 deletions ft_sourcestatistics.m
Expand Up @@ -76,6 +76,7 @@
ft_preamble loadvar varargin
ft_preamble provenance varargin
ft_preamble trackconfig
ft_preamble randomseed

% the ft_abort variable is set to true or false in ft_preamble_init
if ft_abort
Expand Down Expand Up @@ -245,6 +246,7 @@

% do the general cleanup and bookkeeping at the end of the function
ft_postamble debug
ft_postamble randomseed
ft_postamble trackconfig
ft_postamble previous varargin
ft_postamble provenance stat
Expand Down
7 changes: 0 additions & 7 deletions ft_statistics_montecarlo.m
Expand Up @@ -104,9 +104,6 @@
assert(isnumeric(dat), 'this function requires numeric data as input, you probably want to use FT_TIMELOCKSTATISTICS, FT_FREQSTATISTICS or FT_SOURCESTATISTICS instead');
assert(isnumeric(design), 'this function requires numeric data as input, you probably want to use FT_TIMELOCKSTATISTICS, FT_FREQSTATISTICS or FT_SOURCESTATISTICS instead');

% deal with the user specified random seed
ft_preamble randomseed

% check if the input cfg is valid for this function
cfg = ft_checkconfig(cfg, 'renamed', {'factor', 'ivar'});
cfg = ft_checkconfig(cfg, 'renamed', {'unitfactor', 'uvar'});
Expand Down Expand Up @@ -497,9 +494,5 @@
end
end

% deal with the potential user specified randomseed
ft_postamble randomseed

warning(ws); % revert to original state


2 changes: 2 additions & 0 deletions ft_timelockstatistics.m
Expand Up @@ -70,6 +70,7 @@
ft_preamble loadvar varargin
ft_preamble provenance varargin
ft_preamble trackconfig
ft_preamble randomseed

% the ft_abort variable is set to true or false in ft_preamble_init
if ft_abort
Expand Down Expand Up @@ -210,6 +211,7 @@

% do the general cleanup and bookkeeping at the end of the function
ft_postamble debug
ft_postamble randomseed
ft_postamble trackconfig
ft_postamble previous varargin
ft_postamble provenance stat
Expand Down

0 comments on commit fac522c

Please sign in to comment.