Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add all and only keywords to session and runs. #154

Merged
merged 5 commits into from
Dec 15, 2023

Conversation

JoeZiminski
Copy link
Member

@JoeZiminski JoeZiminski commented Dec 11, 2023

closes #122.

This PR adds an 'all' and 'only' options for the session_and_runs input dictionary. This can go either in the sessions key, or for the runs per session. When all is set, then any folder starting with ses-* in the sub folder is added to the preprocess_data.sessions_and_runs. If all is set at the run level, any folder discovered in ses-xxx/ephys is used.

If only key is used, it behaves in the same way but if the result from the folder search is greater than 1, an error is thrown. This is to be used in the instance when you know you only have one run (very common) and want to glob this without putting in every run name, but want some protection you havn't accidently added some other random data there.

One thing that is a little tricky is the runs might not be in the intended order. Because we expect neuroblueprint, we can check the sessions are in the correct order. However, we can't do this with runs. For this reason for now it is not allowd to use the all key at the run level when concatenating across runs - which would be severely effected if the runs went out of order. Otherwise everything is performed per-run which is okay even if they are out of order.

Tests are quite thorought but not entirely complete, see #166

@JoeZiminski JoeZiminski changed the title Quick first implementation for filling sessions and runs with keyword. Add all and only keywords to session and runs. Dec 11, 2023
@JoeZiminski JoeZiminski force-pushed the improved_sessions_and_run_input branch from 1b8f1c0 to 0aea052 Compare December 15, 2023 09:34
@JoeZiminski JoeZiminski merged commit 59ce2bd into dev Dec 15, 2023
14 checks passed
@JoeZiminski JoeZiminski deleted the improved_sessions_and_run_input branch December 15, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Allow flexible inputs into sessions_and_runs, such as all or only
1 participant