Going through the default settings, some values that the users must enter either MUST be present or could be present in the BIDS dataset and bids-matlab can get those data.
% Define sequence parameters, this should be known to the user.
% fMRwhy does not yet support deriving these parameters from the BIDS json files
options.TR = 2; <-------------- HAS to be present for any bold data
options.N_slices = 34; <--------------- can be derived from the size of the nifti file
% Specify number of dummies, even if they have already been excluded from the BOLD timeseries images.
% This is important for the TAPAS PhysIO steps when processing cardiac and respiratory data.
options.Ndummies = 5; <--------------- this should be in the JSON file of the func file. If the user knows it then it should not be entered here.
% The number of scans in the BOLD timeseries images, excluding dummies.
options.Nscans = 210; <--------------- can be derived from the size of the nifti file
% The echo times if multi-echo. fMRwhy assumes this is the same for all functional runs. If not multi-echo, set to [].
options.TE = [14 28 42]; <-------------- this too should be in the json file, no?
There also seems to be quite a few things from the first level of the GLM that could be removed from having the user fill it in.
% Settings for first level analysis: task-motor
options.firstlevel.motor.run1.sess_params.timing_units = 'secs'; <------------- BIDS using seconds as unit so I would make that a default
options.firstlevel.motor.run1.sess_params.timing_RT = 2; <----------- this should be readable from either the nifti or the json
% Settings for plotting task conditions
onset = [11; 31; 51; 71; 91; 111; 131; 151; 171; 191]; <------------ can't those be read from the events.tsv pre-GLM or the SPM.mat post-GLM ?
duration = [10; 10; 10; 10; 10; 10; 10; 10; 10; 10]; <------------ can't those be read from the events.tsv pre-GLM or the SPM.mat post-GLM ?
options.firstlevel.motor.run1.plot_params.cond_onset = onset;
options.firstlevel.motor.run1.plot_params.cond_duration = duration;
Going through the default settings, some values that the users must enter either MUST be present or could be present in the BIDS dataset and bids-matlab can get those data.
There also seems to be quite a few things from the first level of the GLM that could be removed from having the user fill it in.