iblrig.path_helper.iterate_collection
- iblrig.path_helper.iterate_collection(session_path, collection_name='raw_task_data')[source]
Given a session path returns the next numbered collection name.
- Parameters:
- Returns:
The next numbered collection name.
- Return type:
- Parameters:
session_path (str)
Examples
In a folder where there are no raw task data folders
>>> iterate_collection('./subject/2020-01-01/001') 'raw_task_data_00'
In a folder where there is one raw_imaging_data_00 folder
>>> iterate_collection('./subject/2020-01-01/001', collection_name='raw_imaging_data') 'raw_imaging_data_01'