Skip to content

Add itersubjects to Storage class #60

@ixjlyons

Description

@ixjlyons

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature, improved performance, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions