Skip to content

Commit

Permalink
Updating example csv & find_paths to match , usage
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardacenteno committed Apr 21, 2021
1 parent a418e1d commit 4607aea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions fooof/alternative_Compute_broadband.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion fooof/example_MEG_alternative.csv
Original file line number Diff line number Diff line change
@@ -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']
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']
Expand Down

0 comments on commit 4607aea

Please sign in to comment.