From 971858660e0c95ac2901504962b5f5e98e4d11a0 Mon Sep 17 00:00:00 2001 From: CPernet Date: Wed, 28 Jul 2021 09:09:09 +0200 Subject: [PATCH 1/4] parent folder to be passed if empty --- pop_importbids.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pop_importbids.m b/pop_importbids.m index 2927369..84b9b11 100644 --- a/pop_importbids.m +++ b/pop_importbids.m @@ -566,7 +566,7 @@ parent = fileparts(parent); end if isempty(outFile) - outFile = filterHiddenFile(folder, dir(fullfile(parent, fileName))); + outFile = filterHiddenFile(parent, dir(fullfile(parent, fileName))); end function fileList = filterHiddenFile(folder, fileList) From b6efa86590114e2f24b6501fa22ca8f16d021e55 Mon Sep 17 00:00:00 2001 From: CPernet Date: Wed, 28 Jul 2021 09:11:45 +0200 Subject: [PATCH 2/4] bidstask header info --- pop_importbids.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pop_importbids.m b/pop_importbids.m index 84b9b11..fb7cd03 100644 --- a/pop_importbids.m +++ b/pop_importbids.m @@ -21,6 +21,8 @@ % 'eventtype' - [string] BIDS event column to use for EEGLAB event types. % common choices are usually 'trial_type' or 'value'. % Default is 'value'. +% 'bidstask' - [string] value of a key task- allowing to analyze some +% tasks only % % Outputs: % STUDY - EEGLAB STUDY structure From 69682cb2e941528458dc5726371f34719441c97d Mon Sep 17 00:00:00 2001 From: CPernet Date: Wed, 28 Jul 2021 09:30:21 +0200 Subject: [PATCH 3/4] do not report missing file if filtered by task --- pop_importbids.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pop_importbids.m b/pop_importbids.m index fb7cd03..6c2230b 100644 --- a/pop_importbids.m +++ b/pop_importbids.m @@ -246,7 +246,7 @@ ind = strmatch( '.fif', cellfun(@(x)x(end-3:end), allFiles, 'uniformoutput', false) ); % FIF if isempty(ind) ind = strmatch( '.gz', cellfun(@(x)x(end-2:end), allFiles, 'uniformoutput', false) ); % FIF - if isempty(ind) + if isempty(ind) && ~isempty(allFiles) fprintf(2, 'No EEG file found for subject %s\n', bids.participants{iSubject,1}); end end From 71816ef9ec1973705fefeb4701b71f2315acc345 Mon Sep 17 00:00:00 2001 From: CPernet Date: Wed, 28 Jul 2021 09:36:11 +0200 Subject: [PATCH 4/4] make sure JSONio is seen --- pop_importbids.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pop_importbids.m b/pop_importbids.m index 6c2230b..7dd24bb 100644 --- a/pop_importbids.m +++ b/pop_importbids.m @@ -116,6 +116,10 @@ }, 'pop_importbids'); if isstr(opt), error(opt); end +if ~exist('jsondecode.m','file') + addpath([fileparts(which('pop_importbids.m')) filesep 'JSONio']) +end + % Options: % - copy folder % - use channel location and event