File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55from pathlib import Path
66from typing import TYPE_CHECKING , NamedTuple
77
8- import polars as pl
9-
108from rbc .bids import Suffix , TemplateSpace , extract_entities
119from rbc .bids .session import ANAT_GROUP_ENTITIES , SessionTables
1210
@@ -41,9 +39,7 @@ def discover_anatomical(session: SessionTables) -> Iterator[AnatomicalRun]:
4139 Yields:
4240 An :class:`AnatomicalRun` for each T1w group.
4341 """
44- for _ , anat_df in session .anat .filter (pl .col ("suffix" ) == "T1w" ).group_by (
45- ANAT_GROUP_ENTITIES , maintain_order = True
46- ):
42+ for _ , anat_df in session .anat .group_by (ANAT_GROUP_ENTITIES , maintain_order = True ):
4743 row = anat_df .row (0 , named = True )
4844 yield AnatomicalRun (
4945 path = Path (row ["root" ]) / row ["path" ],
Original file line number Diff line number Diff line change 1010
1111import polars as pl
1212
13- from rbc .bids import extract_entities
14- from rbc .bids ._schema import Datatype , Suffix
13+ from rbc .bids import Datatype , Suffix , extract_entities
1514
1615if TYPE_CHECKING :
1716 from collections .abc import Iterator , Sequence
You can’t perform that action at this time.
0 commit comments