Skip to content

Commit 25caaf3

Browse files
committed
Fix paths to metadata files.
1 parent 8f54fad commit 25caaf3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

sdcflows/utils/wrangler.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ def find_estimators(
347347
base_entities = {
348348
"subject": subject,
349349
"extension": [".nii", ".nii.gz"],
350-
"part": ["mag", None],
351350
"scope": "raw", # Ensure derivatives are not captured
352351
}
353352

@@ -372,7 +371,9 @@ def find_estimators(
372371
# flatten lists from json (tupled in pybids for hashing), then unique
373372
b0_ids = reduce(
374373
set.union,
375-
(listify(ids) for ids in layout.get_B0FieldIdentifiers(**base_entities)),
374+
(listify(ids) for ids in layout.get_B0FieldIdentifiers(
375+
session=sessions, **base_entities)
376+
),
376377
set()
377378
)
378379

sdcflows/workflows/fit/tests/test_medic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def test_medic(tmpdir, datadir, workdir, outdir):
3838
magnitude_files = sorted(datadir.glob(pattern))
3939
phase_files = [f.with_name(f.name.replace("part-mag", "part-phase")) for f in magnitude_files]
4040
metadata_dicts = [
41-
loads(Path(f.name.replace('.nii.gz', '.json')).read_text()) for f in magnitude_files
41+
loads(Path(f.with_name(f.name.replace('.nii.gz', '.json'))).read_text())
42+
for f in magnitude_files
4243
]
4344

4445
wf = Workflow(name=f"medic_{magnitude_files[0].name.replace('.nii.gz', '').replace('-', '_')}")

0 commit comments

Comments
 (0)