Skip to content

Commit

Permalink
Save max number of permutations in all modules
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaumet committed Apr 28, 2017
1 parent b61ff14 commit 729a523
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion snpm_cp.m
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ function snpm_cp(CWD)
nidm_json('nidm_NonParametricNullDistribution/nidm_numberOfPermutations') = nPerm;
nidm_json('nidm_NonParametricNullDistribution/nidm_hasResamplingScheme') = 'nidm_Permutation';
nidm_json('nidm_NonParametricNullDistribution/nidm_hasApproximationMethod') = 'nidm_MonteCarlo';
nidm_json('nidm_NonParametricNullDistribution/nidm_maximumNumberOfPermutations') = nPiCond_mx;
nidm_json('nidm_NonParametricNullDistribution/nidm_maximumNumberOfPermutations') = nPerm_max;

con_names = nidm_json('Contrasts').keys;
for i = 1:numel(con_names)
Expand Down
13 changes: 12 additions & 1 deletion snpm_ui.m
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,17 @@ function snpm_ui(varargin)
%-Total #observations
nScan = size(P,1);

%-Max number of possible permutations
if exist('nPiCond_mx', 'var')
nPerm_max = nPiCond_mx;
elseif exist('nPiStud_mx', 'var')
nPerm_max = nPiStud_mx;
elseif exist('nPiSubj_mx', 'var')
nPerm_max = nPiSubj_mx;
else
error('snpm:MissingMaxPerm', 'Maximum number of permutations not found')
end

%-Get general analysis & data parameters
%=======================================================================

Expand Down Expand Up @@ -587,7 +598,7 @@ function snpm_ui(varargin)
s_SnPMcfg_save = ['s_SnPMcfg_save H C B G HCBGnames P PiCond ',...
'sPiCond bhPerms sHCform iGloNorm sGloNorm GM rg GX GMscale CONT ',...
'THRESH MASK ImMASK TH bVarSm vFWHM sVarSm bVolm bST sDesFile sDesign ',...
'V pU_ST_Ut df1 nidm_json nPiCond_mx nidm_json ', ...
'V pU_ST_Ut df1 nidm_json nPerm_max nidm_json ', ...
'sDesSave ',sDesSave];
eval(['save SnPMcfg ',s_SnPMcfg_save])

Expand Down

0 comments on commit 729a523

Please sign in to comment.