|
@@ -103,15 +103,15 @@ class BIDSGenerator(BEP032Data):
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
-
|
|
|
|
- for sub_path in pathlib.Path('.').glob('../sourcedata/sub-*'):
|
|
|
|
|
|
+ code_path = pathlib.Path(__file__).parent
|
|
|
|
+ for sub_path in codepath.glob('../sourcedata/sub-*'):
|
|
sub_id = sub_path.name.split('sub-')[-1]
|
|
sub_id = sub_path.name.split('sub-')[-1]
|
|
for ses_path in sub_path.glob('ses-*'):
|
|
for ses_path in sub_path.glob('ses-*'):
|
|
ses_id = ses_path.name.split('ses-')[-1]
|
|
ses_id = ses_path.name.split('ses-')[-1]
|
|
|
|
|
|
gen = BIDSGenerator(sub_id, ses_id,
|
|
gen = BIDSGenerator(sub_id, ses_id,
|
|
custom_metadata_source={'source_data_folder': ses_path})
|
|
custom_metadata_source={'source_data_folder': ses_path})
|
|
- gen.basedir = pathlib.Path('../rawdata')
|
|
|
|
|
|
+ gen.basedir = code_path.parent
|
|
gen.register_data_sources(ses_path)
|
|
gen.register_data_sources(ses_path)
|
|
gen.generate_directory_structure()
|
|
gen.generate_directory_structure()
|
|
# gen.organize_data_files(mode='link', autoconvert='nwb')
|
|
# gen.organize_data_files(mode='link', autoconvert='nwb')
|