Skip to content

Commit

Permalink
[FIX] Resolve session path for subjects with single session (#169)
Browse files Browse the repository at this point in the history
stop using layout.get return_type="dir"
  • Loading branch information
surchs authored Jun 19, 2023
1 parent b6d15e9 commit 86eb634
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions bagel/bids_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,10 @@ def get_session_path(
# switch to using layout.get() snippet below to fetch subject path.
bids_dir
/ f"sub-{bids_sub_id}"
# layout.get(
# subject=bids_sub_id,
# target="subject",
# return_type="dir",
# )[0]
)
else:
session_path = Path(
layout.get(
subject=bids_sub_id,
session=session,
target="session",
return_type="dir",
)[0]
session_path = (
Path(layout.root) / f"sub-{bids_sub_id}" / f"ses-{session}"
)

return session_path.resolve().as_posix()

0 comments on commit 86eb634

Please sign in to comment.