From 98eb2930d1efb9130b824815d97eec8ce3b561bb Mon Sep 17 00:00:00 2001 From: cll008 Date: Thu, 28 Oct 2021 13:57:42 -0700 Subject: [PATCH 1/4] GUI update: reformat char to string for tInfo and gInfo fix #95. also add .txt extension to README. tested to work with p300 dataset. --- bids_export.m | 2 +- pop_taskinfo.m | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/bids_export.m b/bids_export.m index 4368808..6a6748f 100644 --- a/bids_export.m +++ b/bids_export.m @@ -481,7 +481,7 @@ function bids_export(files, varargin) % --------------------------- if ~isempty(opt.README) if exist(opt.README) ~= 2 - fid = fopen(fullfile(opt.targetdir, 'README'), 'w'); + fid = fopen(fullfile(opt.targetdir, 'README.txt'), 'w'); if fid == -1, error('Cannot write README file'); end fprintf(fid, '%s', opt.README); fclose(fid); diff --git a/pop_taskinfo.m b/pop_taskinfo.m index 77c4363..5f651ee 100644 --- a/pop_taskinfo.m +++ b/pop_taskinfo.m @@ -192,7 +192,11 @@ function okCB(src,event) if strcmp(objs(i).Tag, 'ReferencesAndLinks') || strcmp(objs(i).Tag, 'Authors') gInfo.(objs(i).Tag) = {objs(i).String}; else - gInfo.(objs(i).Tag) = objs(i).String; + tmp = objs(i).String; + if ndims(tmp) > 1 && size(tmp,1) > 1 + tmp = reformatchartostring(tmp); + end + gInfo.(objs(i).Tag) = tmp; end else if strcmp(objs(i).Style, 'popupmenu') @@ -210,7 +214,11 @@ function okCB(src,event) tmp.FilterDescription.Description = objs(i).String; tInfo.(objs(i).Tag) = tmp; else - tInfo.(objs(i).Tag) = objs(i).String; + tmp = objs(i).String; + if ndims(tmp) > 1 && size(tmp,1) > 1 + tmp = reformatchartostring(tmp); + end + tInfo.(objs(i).Tag) = tmp; end end end @@ -340,4 +348,10 @@ function preFill() function editedCB(src,event) end + + function string_out = reformatchartostring(char_in) + char_in(1:end-1,end+1) = newline; + char_in = char_in'; + string_out = char_in(:)'; + end end \ No newline at end of file From 855440bbbbe6bd827921a122a580a8c4f7f5de6b Mon Sep 17 00:00:00 2001 From: Clement Lee <36056486+cll008@users.noreply.github.com> Date: Thu, 4 Nov 2021 15:26:28 -0700 Subject: [PATCH 2/4] Update bids_export.m --- bids_export.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bids_export.m b/bids_export.m index 6a6748f..4368808 100644 --- a/bids_export.m +++ b/bids_export.m @@ -481,7 +481,7 @@ function bids_export(files, varargin) % --------------------------- if ~isempty(opt.README) if exist(opt.README) ~= 2 - fid = fopen(fullfile(opt.targetdir, 'README.txt'), 'w'); + fid = fopen(fullfile(opt.targetdir, 'README'), 'w'); if fid == -1, error('Cannot write README file'); end fprintf(fid, '%s', opt.README); fclose(fid); From ba157c0d6b6f3500156919f921db18609d9e9eb6 Mon Sep 17 00:00:00 2001 From: Arnaud Delorme Date: Wed, 10 Nov 2021 17:36:54 -1000 Subject: [PATCH 3/4] version 6 --- README.md | 2 ++ bids_export_example3.m | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2bee547..ea6db60 100644 --- a/README.md +++ b/README.md @@ -45,3 +45,5 @@ v5.3 - adding capability to export stimuli v5.3.1 - update documentation for tInfo.HardwareFilters; fix bug defaults fields not filled for eInfo v5.4 - fix issue with reading BIDS information when importing BIDS data to STUDY + +v6.0 - new examples and fixes for HED diff --git a/bids_export_example3.m b/bids_export_example3.m index e01ed18..eff3a46 100644 --- a/bids_export_example3.m +++ b/bids_export_example3.m @@ -124,7 +124,6 @@ 'CHANGES', CHANGES, ... 'codefiles', codefiles, ... 'trialtype', trialTypes, ... - 'chanlookup', '/data/matlab/eeglab/plugins/dipfit/standard_BEM/elec/standard_1005.elc', ... 'renametype', {}, ... 'checkresponse', 'condition 1', ... 'tInfo', tInfo, ... From 58dbeb28cb3ff5b4c1f25724b8f21a293304b007 Mon Sep 17 00:00:00 2001 From: Arnaud Delorme Date: Wed, 10 Nov 2021 18:09:10 -1000 Subject: [PATCH 4/4] version number --- eegplugin_bids.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eegplugin_bids.m b/eegplugin_bids.m index e31996d..211eee4 100644 --- a/eegplugin_bids.m +++ b/eegplugin_bids.m @@ -11,7 +11,7 @@ function vers = eegplugin_bids(fig, trystrs, catchstrs) - vers = '5.4'; + vers = '6.0'; if nargin < 3 error('eegplugin_bids requires 3 arguments'); end