Skip to content

Feature: dedicated user parameters creation - #302

Merged
AljenU merged 8 commits into
automaticanalysis:masterfrom
AljenU:feature-dedicated-user-parameters-creation
Nov 26, 2021
Merged

Feature: dedicated user parameters creation#302
AljenU merged 8 commits into
automaticanalysis:masterfrom
AljenU:feature-dedicated-user-parameters-creation

Conversation

@AljenU

@AljenU AljenU commented Nov 22, 2021

Copy link
Copy Markdown
Collaborator

Adapt aa_example_helloworld and related code, to form tutorial_1_aa_setup, with dedicated section to creating a user parameter xml file.

Fixes #301

…gh xml file at the default location

Add inputs to save the new file at the default location with the default filename

Also ask for spm and rawdatadir locations when using the base parameter xml as seed, since those are required for a minimal-complete parameter xml file.
…rectly

Use aas_create_parameter_xml to create the user parameter xml file with the default name in the default location.

Additionally, update various comments in the file

Final changes to complete automaticanalysis#301
Comment thread examples/tutorials/tutorial_1_aa_setup.m Outdated
Comment thread examples/tutorials/tutorial_1_aa_setup.m Outdated
% -------------------------------------------------------------------------
% For BIDS data, point rawdatadir at the top level BIDS directory
% (i.e., wherever you downloaded ds000114)
FULLDATAPATH = '/full/path/to/toplevelBIDS';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using the 'aa_demo' subfolder in aap.directory_conventions.rawdatadir to avoid the need to edit this file (in the repo)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added some changes for this to the PR. Note that the next item is some rework of aa_downloaddemo, some more comment changes etc. will be added then, when the updated assumptions in aa_downloaddemo are clear.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think aa_downloaddemo should be rewritten according to the CI tests. We can, perhaps, ditch the aademo dataset because the SPMCh30 and the BIDS114 seem to provide a good usecase coverage.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am working on that. The SPMch30 is not directly ready for use, i think, so will keep the aa_demo dataset as default for now.

tutorial_1: add downloaddemo call, remove aa_close call
other examples: remove aa_close call, it is not needed when aa runs successfully, as it
is already part of both aa_doprocessing and aa_report
Comment thread examples/tutorials/tutorial_1_aa_setup.m
@AljenU
AljenU requested a review from tiborauer November 24, 2021 15:18
@jones-michael-s

Copy link
Copy Markdown
Collaborator

Been playing with aas_create_parameter_xml. I think this is a great addition. One tweak that might improve usage: Prompts are displayed in the command window when using the non-GUI option -- could we also use these as the dialog box title for the GUI option? (I believe the uiget* utilities all take a TITLE parameter). That would help the user know what files are being selected.

@AljenU

AljenU commented Nov 24, 2021

Copy link
Copy Markdown
Collaborator Author

Been playing with aas_create_parameter_xml. I think this is a great addition. One tweak that might improve usage: Prompts are displayed in the command window when using the non-GUI option -- could we also use these as the dialog box title for the GUI option? (I believe the uiget* utilities all take a TITLE parameter). That would help the user know what files are being selected.

For me they do show up at the top of the gui dialogs, both windows and linux:
temp_1
temp_2

@jones-michael-s

jones-michael-s commented Nov 24, 2021

Copy link
Copy Markdown
Collaborator

Thats... odd. Did you change userinput.m? The version I have takes the title string as varargin{3}. This is passed to "input" (for example line 49) but not to uigetfile (for example line 42).

Or maybe varargin{2:end} works differently on OS X?

@AljenU

AljenU commented Nov 24, 2021

Copy link
Copy Markdown
Collaborator Author

Thats... odd. Did you change userinput.m? The version I have takes the title string as varargin{3}. This is passed to "input" (for example line 49) but not to uigetfile (for example line 42).

Or maybe varargin{2:end} works differently on OS X?

For OS X it does not show a title apparently, various questions have been asked, and solutions are mainly workarounds:

https://nl.mathworks.com/matlabcentral/answers/251141-uigetfile-dialogtitle-does-not-show-in-file-browser
https://nl.mathworks.com/matlabcentral/answers/336413-mac-unix-uigetfile-dialog-box-has-no-title
https://nl.mathworks.com/matlabcentral/answers/484281-why-am-i-unable-to-select-a-file-when-i-use-uigetfile-function-on-the-newest-mac-operation-system

@jones-michael-s

jones-michael-s commented Nov 24, 2021

Copy link
Copy Markdown
Collaborator

Update: This might be an OS-X glitch. If I run this example from the uigetfile help page:

 [filename, pathname] = uigetfile( ...
       {'*.m;*.fig;*.mat;*.mdl', 'All MATLAB Files (*.m, *.fig, *.mat, *.mdl)'; ...
        '*.*',                   'All Files (*.*)'}, ...
        'Pick a file');

Nowhere in the dialog box do the words "Pick a file" appear.

Oops -- looks like we posted at the same time!

@jones-michael-s

Copy link
Copy Markdown
Collaborator

I guess a simple workaround would be printing vararg{3} to the command window before putting up the dialog box if ismac is true. It's not elegant, but would be easy to implement

@tiborauer

tiborauer commented Nov 26, 2021

Copy link
Copy Markdown
Member

Can we, perhaps, add these examples (at least the shorter, tutorial ones) also to the tests?
I can see, @AljenU, your WIP is on it.

@tiborauer

Copy link
Copy Markdown
Member

Can we merge this, @AljenU, or do you still work on the Mac-workaround?

@AljenU

AljenU commented Nov 26, 2021

Copy link
Copy Markdown
Collaborator Author

Can we, perhaps, add these examples (at least the shorter, tutorial ones) also to the tests?

Tutorial_1 will be added to the tests when and alongside the downloaddemo rework. I have a branch almost ready with those changes, it also includes wrapping the current use case tests in a matlab unittest wrapper. Will rebase the branch and create the PR when the current two PRs are merged.

Can we merge this, @AljenU, or do you still work on the Mac-workaround?
I guess a simple workaround would be printing vararg{3} to the command window before putting up the dialog box if ismac is true. It's not elegant, but would be easy to implement

I will add it in the new PR, lets get this one in now.

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.

ENH - adapt helloworld to explicitly set up the user parameter xml

3 participants