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

Conversation

yunshiuan
Copy link
Contributor

By design, when MDS failed at the initial trial, it might be fixed (in the catch blocks) by changing criterion from user-specified criterion to 'stress', or adding 0.2 to distances to avoid colocalization. However, this information is never shown or accessible by users. That is, MDS plot is displayed as normal and users could easily ignore the fact that the MDS criterion might have been changed. Therefore, I edit the codes so that whenever the MDS fails at the initial trial (and is fixed afterwards by the catch blocks), the description of the changes made is visible to the users.

By design, when MDS failed at the initial trial, it might be fixed (in the catch blocks) by changing criterion from user-specified criterion to 'stress', or adding 0.2 to distances to avoid colocalization. However, this information is never shown or accessible by users. That is, MDS plot is displayed as normal and users could easily ignore the fact that the MDS criterion might have been changed. Therefore, I edit the codes so that whenever the MDS fails at the initial trial (and is fixed afterwards by the catch blocks), the description of the changes made is visible to the users.
(1)Comment out the saveas() block at the end (line 1044).
"gcf" has already been closed by handleCurrentFigure() (line 942 and 1041), and the plots have already been saved as files.
Thus, any attempt to call saveas(gcf,...) is needless. ( With gcf being closed, this will only save a blank file).

In case if one would like to keep the saveas() block uncommented, there are several bugs to be fixed.
(2)Initiate userOptions.saveFigureFig in the "set default options" block.
Error Message: 
Reference to non-existent field 'saveFigureFig'.
line 1051 in compareRefRDM2candRDMs.m.
Reason:
The field 'userOptions.saveFigureFig' is not initiated at the "set default options" block.

(3)Typo: "userOptions.saveFigureEPS" is mistakenly typed as "userOptions.savesFigurePS". (line 1048)
Old:
if userOptions.saveFiguresPS
    saveas(gcf,[userOptions.analysisName,'_comparingRefRDM2CandRDMs','.eps'],'eps');
end
Fixed:
if userOptions.saveFigureEPS
     saveas(gcf,[userOptions.analysisName,'_comparingRefRDM2CandRDMs','.eps'],'eps');
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant