From d1c5d5552cca74789e4a0154d48370af63b2221c Mon Sep 17 00:00:00 2001 From: haoershi Date: Mon, 22 Jan 2024 15:07:18 -0500 Subject: [PATCH] update --- demo/ana_pipeline.m | 11 +++++++---- {matlab/tools/others => demo/helpfunc}/hex2rgb.m | 0 matlab/iEEGPreprocess.m | 1 + matlab/tools/others/login_config_base.m | 6 +++--- 4 files changed, 11 insertions(+), 7 deletions(-) rename {matlab/tools/others => demo/helpfunc}/hex2rgb.m (100%) mode change 100644 => 100755 matlab/iEEGPreprocess.m mode change 100644 => 100755 matlab/tools/others/login_config_base.m diff --git a/demo/ana_pipeline.m b/demo/ana_pipeline.m index ec91df9..1241d91 100644 --- a/demo/ana_pipeline.m +++ b/demo/ana_pipeline.m @@ -28,7 +28,10 @@ % * Fieldtrip (optional for section 4) %% set path -filename = which('ana_pipeline.m'); +filename = mfilename('fullpath'); +if contains(filename,'LiveEditorEvaluationHelper') + filename = matlab.desktop.editor.getActiveFilename; +end [work_path, ~, ~] = fileparts(filename); cd(work_path); addpath(genpath('.')); % this should add analysis and matlab folder @@ -45,7 +48,7 @@ 'name',{'Common average re-referencing'; 'Bipolar re-referencing';'Laplacian re-referencing'}, ... 'col', mat2cell(hex2rgb({'#51b8bd','#de7862','#63804f'}),ones(3, 1))); -ifRef = logical([1, 1, 1]); % <- make change here +ifRef = logical([1, 1, 0]); % <- make change here params.ref = ref(ifRef); params.nRef = length(find(ifRef)); params.LAR_loc = ''; @@ -96,11 +99,11 @@ params.nSeg = 5; % <- make change here % 🟡dataset allDataset = {'HUP','MUSC'}; -params.dataset = 'MUSC'; % <- make change here +params.dataset = 'HUP'; % <- make change here if exist(params.dataset,'dir') == 0 mkdir(fullfile(work_path,params.dataset)); end -params.chans_to_use = 'LR'; % <- make change here, options gw, gray, white, LR +params.chans_to_use = 'gw'; % <- make change here, options gw, gray, white, LR % print some basic characteristics fprintf('There are:\n'); diff --git a/matlab/tools/others/hex2rgb.m b/demo/helpfunc/hex2rgb.m similarity index 100% rename from matlab/tools/others/hex2rgb.m rename to demo/helpfunc/hex2rgb.m diff --git a/matlab/iEEGPreprocess.m b/matlab/iEEGPreprocess.m old mode 100644 new mode 100755 index b6d64c9..c28141e --- a/matlab/iEEGPreprocess.m +++ b/matlab/iEEGPreprocess.m @@ -298,6 +298,7 @@ function check_user(obj) if isempty(obj.users) disp('Please set up iEEG login info before downloading data.'); obj.login_config(); + obj.load_all_users(); end end diff --git a/matlab/tools/others/login_config_base.m b/matlab/tools/others/login_config_base.m old mode 100644 new mode 100755 index c06c7ba..4d936f3 --- a/matlab/tools/others/login_config_base.m +++ b/matlab/tools/others/login_config_base.m @@ -4,9 +4,9 @@ % added variable input for testing purposes p = inputParser; - addOptional(p, 'username', '', @(x) isstring(x) || ischar(x)); - addOptional(p, 'password', '', @(x) isstring(x) || ischar(x)); - parse(p, varargin); + addOptional(p, 'username', '',@(x) isstring(x) || ischar(x)); + addOptional(p, 'password', '',@(x) isstring(x) || ischar(x)); + parse(p, varargin{:}); username = p.Results.username; password = p.Results.password;