diff --git a/src/utils/removeAllDateSuffix.m b/src/utils/removeAllDateSuffix.m index 3abab5fd..946cf4a6 100644 --- a/src/utils/removeAllDateSuffix.m +++ b/src/utils/removeAllDateSuffix.m @@ -2,26 +2,25 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % - % Short description of what the function does goes here. + % Function removes the date suffix in the _events and _stim (.tsv and .json) + % files in given raw, session and subject folder. And zips the _stim files. + % Function will look for files with suffix of ``_date-*`` % % USAGE:: % - % [argout1, argout2] = templateFunction(argin1, [argin2 == default,] [argin3]) + % removeAllDateSuffix(rawDir, subjName, sesName) % - % :param argin1: (dimension) obligatory argument. Lorem ipsum dolor sit amet, - % consectetur adipiscing elit. Ut congue nec est ac lacinia. - % :type argin1: type - % :param argin2: optional argument and its default value. And some of the - % options can be shown in litteral like ``this`` or ``that``. - % :type argin2: string - % :param argin3: (dimension) optional argument - % :type argin3: integer + % :param rawDir: BIDS raw folder directory. + % :type rawDir: string % - % :returns: - :argout1: (type) (dimension) - % - :argout2: (type) (dimension) - % - % removeAllDateSuffix(rawDir, subjName, sesName) + % :param subjName: Some of the options can be ``sub-001`` or ``sub-pilot001``. + % :type subjName: string % + % :param sesName: Some of the options can be ``ses-001`` or ``ses-003``. + % :type sesName: string + + % :output: - files are renamed by removing '_date-*' suffix + % and _stim files are zipped labels = {'func', 'bold', 'eeg', 'ieeg', 'meg', 'beh'}; diff --git a/src/utils/removeDateSuffix.m b/src/utils/removeDateSuffix.m index ae5e8a80..1ed96087 100644 --- a/src/utils/removeDateSuffix.m +++ b/src/utils/removeDateSuffix.m @@ -2,27 +2,21 @@ function removeDateSuffix(filenames, subjectPath) % - % Short description of what the function does goes here. + % Function removes the date suffix in a given filename(s) + % Function will look for regular expression in filenames with ``_date-`` + % % USAGE:: % - % [argout1, argout2] = templateFunction(argin1, [argin2 == default,] [argin3]) - % - % :param argin1: (dimension) obligatory argument. Lorem ipsum dolor sit amet, - % consectetur adipiscing elit. Ut congue nec est ac lacinia. - % :type argin1: type - % :param argin2: optional argument and its default value. And some of the - % options can be shown in litteral like ``this`` or ``that``. - % :type argin2: string - % :param argin3: (dimension) optional argument - % :type argin3: integer - % - % :returns: - :argout1: (type) (dimension) - % - :argout2: (type) (dimension) + % removeDateSuffix(filenames, subjectPath) % - % removeDateSuffix(filenames, subjectPath) + % :param filenames: File names with _date- suffix + % :type filenames: string % + % :param subjectPath: Location/path of the files + % :type subjectPath: string % + % :output: - files are renamed by removing '_date-*' suffix if isempty(filenames) filenames = {};