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 itersubjects to Storage class #60

Open
ixjlyons opened this issue Mar 28, 2019 · 0 comments
Open

Add itersubjects to Storage class #60

ixjlyons opened this issue Mar 28, 2019 · 0 comments
Labels
enhancement New feature, improved performance, etc.

Comments

@ixjlyons
Copy link
Member

It's pretty common to iterate over subjects in post-experiment analysis and that's kind of clunky at the moment:

storage = Storage('data')
for subj in storage.subject_ids:
    storage.subject_id = subj
    reader = storage.require_task('sometask')
    ...

Better:

storage = Storage('data')
for subj in storage.itersubjects():
    reader = storage.require_task('sometask')
    ...

It'd also be pretty rad if you could optionally pass a task to get the reader object instead:

storage = Storage('data')
for reader in storage.itersubjects(task='sometask'):
   ...

Should be pretty straightforward to implement.

@ixjlyons ixjlyons added the enhancement New feature, improved performance, etc. label Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, improved performance, etc.
Projects
None yet
Development

No branches or pull requests

1 participant