Skip to content

Commit

Permalink
fix bug in bids tag order dependency when finding first echo
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanKuurstra committed Apr 16, 2024
1 parent 50a9a17 commit 4e46486
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pipeline_SS_TV_Siemens.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ def create_pipeline_SS_TV(bids_dir,
if layout.get_sessions(subject=subject) == []:
if sessions == ['.*']:
first_echo_files = first_echo_files + layout.get(subject=subject, modality='anat',
extensions='.*part-phase.*echo-0*1.*.nii.*', )
extensions='^(?=.*_part-phase_)(?=.*echo-0*1).*.nii.*', )
else:
print(
"Warning: Session filter applied, but subject " + subject + " has no bids session information. This subject has been ignored.")
else:
for session in sessions:
first_echo_files = first_echo_files + layout.get(subject=subject, session=session, modality='anat',
extensions='.*part-phase.*echo-0*1.*.nii.*', )
extensions='^(?=.*_part-phase_)(?=.*echo-0*1).*.nii.*', )
anat_folders = []
for img in first_echo_files:
full_dirname = os.path.dirname(img.filename)
Expand Down

0 comments on commit 4e46486

Please sign in to comment.