From 4607aea7564bca39c9c559cdd52fbe471378c743 Mon Sep 17 00:00:00 2001 From: Eduarda Date: Wed, 21 Apr 2021 10:52:11 +0200 Subject: [PATCH] Updating example csv & find_paths to match , usage --- fooof/alternative_Compute_broadband.py | 5 +++-- fooof/example_MEG_alternative.csv | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fooof/alternative_Compute_broadband.py b/fooof/alternative_Compute_broadband.py index 765ff45..7e63792 100755 --- a/fooof/alternative_Compute_broadband.py +++ b/fooof/alternative_Compute_broadband.py @@ -100,7 +100,7 @@ def find_paths(main_dir, subject, extension, **kwargs): subject='mumo_002', extension='.asc', key1='OD1', - selection=['Tr01']) + selection=['Tr01', 'Tr04']) Returns ------- @@ -147,7 +147,8 @@ def find_paths(main_dir, subject, extension, **kwargs): elif key == 'selection': if isinstance(value, list): selection = value - elif isinstance(value,str): + elif isinstance(value, str): + selection = selection.replace((';',',')) # Step that convert ; to , (used in example.csv) selection = ast.literal_eval(value) assert isinstance(selection, list), 'Argument should end up being a list of Tr numbers strings' assert all(isinstance(item, str) for item in selection), 'Argument must be a list of of Tr numbers strings' diff --git a/fooof/example_MEG_alternative.csv b/fooof/example_MEG_alternative.csv index 36dea1e..ea0b381 100644 --- a/fooof/example_MEG_alternative.csv +++ b/fooof/example_MEG_alternative.csv @@ -1 +1 @@ -Path;Case_ID;MM;Atlas;Start;End;Selection /path/to/subjects/;subjectID;Timepoint;;1;5; /path/to/subjects/;subjectID;Timepoint;;;;['Tr01','Tr02','Tr03','Tr04','Tr05'] \ No newline at end of file +Path,Case_ID,MM,Atlas,Start,End,Selection /path/to/subjects/,subjectID,Timepoint,,1,5, /path/to/subjects/,subjectID,Timepoint,,,,['Tr01';'Tr02';'Tr03';'Tr04';'Tr05'] \ No newline at end of file