Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print out MDS comment if it failed at the initial trial #29

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion +rsa/+fig/figureMDSArrangement.m
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ function figureMDSArrangement(RDM, userOptions, localOptions)
catch
description{1}=[RDMname ', MDS failed...'];
end
end
end
% If MDS failed at the initial trial, print out comment about the MDS
% (e.g., changed criterion, added 0.2 to distance)
fprintf(['Fail at the initial MDS trial: ',char(description),'\n']);
end


Expand Down
50 changes: 25 additions & 25 deletions +rsa/compareRefRDM2candRDMs.m
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
% correlation. (Note that multiple independent measurements of the
% reference or candidate RDMs could also come from repeated
% measurements within one subject. We refer to the instances as
% subjects, because subject random-effects inference is the most
% subjects, because subject random-effects inference is the most
% common case.)
%
% 'randomisation': Test the relatedness of the reference RDM to each
Expand Down Expand Up @@ -323,6 +323,10 @@
% If true(default: false), the figures are saved in post-script
% format in userOptions.resultsPath.
%
% userOptions.saveFigureEPS
% If true(default: false), the figures are saved in EPS format in
% userOptions.resultsPath.
%
% userOptions.saveFigureFig
% If true (default: false), the figures are saved in Matlab .fig
% format in userOptions.resultsPath.
Expand Down Expand Up @@ -354,14 +358,6 @@
% values)
% stats_p_r.ceiling: ceiling lower and upper bounds

import rsa.*
import rsa.fig.*
import rsa.fmri.*
import rsa.rdm.*
import rsa.sim.*
import rsa.spm.*
import rsa.stat.*
import rsa.util.*

%% set default options
userOptions = setIfUnset(userOptions, 'RDMcorrelationType', 'Spearman');
Expand All @@ -379,6 +375,10 @@
userOptions = setIfUnset(userOptions, 'resultsPath',pwd);
userOptions = setIfUnset(userOptions, 'saveFigurePDF', true);
userOptions = setIfUnset(userOptions, 'saveFigurePS', false);
userOptions = setIfUnset(userOptions, 'saveFigureFig', false);
userOptions = setIfUnset(userOptions, 'saveFigureEPS', false);


userOptions = setIfUnset(userOptions, 'figure1filename', 'compareRefRDM2candRDMs_barGraph');
userOptions = setIfUnset(userOptions, 'figure2filename', 'compareRefRDM2candRDMs_RDMcomparisonPvalues');

Expand Down Expand Up @@ -1041,19 +1041,19 @@
handleCurrentFigure([userOptions.resultsPath,filesep,userOptions.figure2filename],userOptions);


%% save it
cd(fullfile(userOptions.rootPath));
if userOptions.saveFiguresPS
saveas(gcf,[userOptions.analysisName,'_comparingRefRDM2CandRDMs','.eps'],'eps');
end
if userOptions.saveFiguresFig
saveas(gcf,[userOptions.analysisName,'_comparingRefRDM2CandRDMs','.fig'],'fig');
end
if userOptions.saveFiguresPDF
exportCurrentFigAsPDF([userOptions.analysisName,'_comparingRefRDM2CandRDMs'],userOptions);
end
if userOptions.saveFiguresPS
exportCurrentFigAsPostscript([userOptions.analysisName,'.ps'],userOptions);
end

end%function
%% save it (no longer needed)
% Saving plot to file has already been handled by handleCurrentFigure()
% above.
% cd(fullfile(userOptions.rootPath));
% if userOptions.saveFigureEPS
% saveas(gcf,[userOptions.analysisName,'_comparingRefRDM2CandRDMs','.eps'],'eps');
% end
% if userOptions.saveFigureFig
% saveas(gcf,[userOptions.analysisName,'_comparingRefRDM2CandRDMs','.fig'],'fig');
% end
% if userOptions.saveFigurePDF
% exportCurrentFigAsPDF([userOptions.analysisName,'_comparingRefRDM2CandRDMs'],userOptions);
% end
% if userOptions.saveFigurePS
% exportCurrentFigAsPostscript([userOptions.analysisName,'.ps'],userOptions);
% end