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

BidsDataset advanced component selection #244

Open
pvandyken opened this issue Feb 11, 2023 · 1 comment
Open

BidsDataset advanced component selection #244

pvandyken opened this issue Feb 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@pvandyken
Copy link
Contributor

As proposed in #209, this will be an API allowing the selection of multiple components from a single Dataset. All would return a new dataset containing only the selected components.

The functions are outlined below:

  • BidsDataset[<one or more components>]

    Extends the current api allowing the selection of just one component. If multiple components are provided, a new dataset is returned containing just those components. This is potentially useful in combination with intersection type calculations.

  • BidsDataset.drop(*components)

    As above, but drops components instead of selecting

  • BidsDataset.with_entities(*entities, exact: bool = False) -> BidsDataset

    Return dataset containing only the components with the given entities. Setting exact=True also filters out components with extra entities beyond the selected *entities. Most likely use here is in combination with BidsDataset.expand to expand over a consensus of specific entities.

  • BidsDataset.without_entities(*entities) -> BidsDataset

    As above, but inverse

@pvandyken pvandyken added the enhancement New feature or request label Feb 11, 2023
@tkkuehn
Copy link
Contributor

tkkuehn commented Jun 2, 2023

The first point will be pretty easy to implement with MultiSelectDict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants