From 4b5fe63c84d3ea85af5baaffe7a36cc465d28285 Mon Sep 17 00:00:00 2001 From: Ceren Date: Mon, 16 Nov 2020 16:52:07 +0100 Subject: [PATCH 1/3] doc update on convertSourceToRaw.m --- src/convertSourceToRaw.m | 32 ++++++++++++-------------------- src/utils/removeAllDateSuffix.m | 4 ++-- src/utils/removeDateSuffix.m | 2 +- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/convertSourceToRaw.m b/src/convertSourceToRaw.m index 3684733f..e8b39cce 100644 --- a/src/convertSourceToRaw.m +++ b/src/convertSourceToRaw.m @@ -2,33 +2,25 @@ function convertSourceToRaw(cfg) % - % Short description of what the function does goes here. - % - % USAGE:: + % Function attempts to convert a source dataset created with CPP_BIDS into a valid + % BIDS data set. % - % [argout1, argout2] = templateFunction(argin1, [argin2 == default,] [argin3]) + % Only covers func folder at the moment % - % :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 + % USAGE:: % - % :returns: - :argout1: (type) (dimension) - % - :argout2: (type) (dimension) + % convertSourceToRaw(cfg) % - % convertSourceToRaw(cfg) + % :param cfg: cfg structure is needed only for providing the path in + % ``cfg.dir.output`` + % :type cfg: structure % - % attempts to convert a source dataset created with CPP_BIDS into a valid - % BIDS data set. + % :output: % - creates dummy README and CHANGE file % - copy source dir to raw dir - % - remove the date suffix (_date-YYYYMMDDHHMM) from the files where it is present - % - % Only covers func folder at the moment + % - remove the date suffix (_date-*) from the files where it is present + % - zips the _stim files. + sourceDir = fullfile(cfg.dir.output, 'source'); rawDir = fullfile(cfg.dir.output, 'raw'); diff --git a/src/utils/removeAllDateSuffix.m b/src/utils/removeAllDateSuffix.m index 39e86bb1..946cf4a6 100644 --- a/src/utils/removeAllDateSuffix.m +++ b/src/utils/removeAllDateSuffix.m @@ -4,7 +4,7 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % % 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-yyyymmddHHMM`` + % Function will look for files with suffix of ``_date-*`` % % USAGE:: % @@ -19,7 +19,7 @@ function removeAllDateSuffix(rawDir, subjName, sesName) % :param sesName: Some of the options can be ``ses-001`` or ``ses-003``. % :type sesName: string - % :output: - files are renamed by removing '_date-yyyymmddHHMM' suffix + % :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 33ac7470..1ed96087 100644 --- a/src/utils/removeDateSuffix.m +++ b/src/utils/removeDateSuffix.m @@ -16,7 +16,7 @@ function removeDateSuffix(filenames, subjectPath) % :param subjectPath: Location/path of the files % :type subjectPath: string % - % :output: - files are renamed by removing '_date-yyyymmddHHMM' suffix + % :output: - files are renamed by removing '_date-*' suffix if isempty(filenames) filenames = {}; From 96830fbe407449a607eb561d33585000e0e60e33 Mon Sep 17 00:00:00 2001 From: Ceren Date: Mon, 16 Nov 2020 16:56:23 +0100 Subject: [PATCH 2/3] mh fix --- src/convertSourceToRaw.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/convertSourceToRaw.m b/src/convertSourceToRaw.m index e8b39cce..ad62d11e 100644 --- a/src/convertSourceToRaw.m +++ b/src/convertSourceToRaw.m @@ -15,13 +15,12 @@ function convertSourceToRaw(cfg) % ``cfg.dir.output`` % :type cfg: structure % - % :output: + % :output: % - creates dummy README and CHANGE file % - copy source dir to raw dir % - remove the date suffix (_date-*) from the files where it is present % - zips the _stim files. - sourceDir = fullfile(cfg.dir.output, 'source'); rawDir = fullfile(cfg.dir.output, 'raw'); From 2e7ff48636bc7ac1fdff22ca0fbed5cf8fc32333 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Mon, 16 Nov 2020 19:52:11 +0100 Subject: [PATCH 3/3] Update src/convertSourceToRaw.m --- src/convertSourceToRaw.m | 1 - 1 file changed, 1 deletion(-) diff --git a/src/convertSourceToRaw.m b/src/convertSourceToRaw.m index ad62d11e..3e779a53 100644 --- a/src/convertSourceToRaw.m +++ b/src/convertSourceToRaw.m @@ -5,7 +5,6 @@ function convertSourceToRaw(cfg) % Function attempts to convert a source dataset created with CPP_BIDS into a valid % BIDS data set. % - % Only covers func folder at the moment % % USAGE:: %