Feel free to open issues to report a bug and ask for improvements.
If you want to contribute, have a look at our contributing guidelines that are meant to guide you and help you get started. If something is not clear or you get stuck: it is more likely we did not do good enough a job at explaining things. So do not hesitate to open an issue, just to ask for clarification.
We use camelCase
to name functions and variables for the vast majority of the
code in this repository.
Scripts names in general and as well functions related to the demos use a
snake_case
.
Constant are written in UPPERCASE
.
From more general to more specific
BIDS
> opt
> subject
> session
> run
BIDS
(output fromgetData
orbids.layout
) restrict the set of possible analysis one can run to this BIDS data setopt
restricts this set even furthersubject
/session
/run
even more
% OK
varargout = getInfo(BIDS, opt, subLabel, info, varargin)
% not OK
varargout = getInfo(subLabel, BIDS, opt, info, varargin)
Try to return them in order of importance first and in order of appearance otherwise.
If function creates or modifies a batch then matlabbatch
is the first argin
and first argout
.
If a function performs an "action" to be chosen from a one of several strings
(with a switch statement), this string comes as first argin
or second if
matlabbatch
is first.
% OK
varargout = getInfo('filename', BIDS, opt, subID, varargin)
[matlabbatch, voxDim] = setBatchRealign(matlabbatch, [action = 'realign',] BIDS, opt, subID)
% not OK
% 'filename' is the name of the "action" or the info to get in this case
% batch and action should go first
varargout = getInfo(BIDS, opt, subID, 'filename', varargin)
[matlabbatch, voxDim] = setBatchRealign(BIDS, opt, subID, matlabbatch, [action = 'realign'])