Skip to content

[ENH] Respect SliceEncodingDirection metadata #1350

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

Merged
merged 7 commits into from
Nov 1, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
"affiliation": "Department of Psychology, University of Oslo",
"orcid": "0000-0002-8508-9088"
},
{
"name": "Liem, Franz",
"affiliation": "University of Zurich",
"orcid": "0000-0003-0646-4810"
},
{
"name": "Poldrack, Russell A.",
"affiliation": "Department of Psychology, Stanford University",
Expand Down
2 changes: 1 addition & 1 deletion fmriprep/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
'grabbit==0.2.3',
'pybids==0.6.5',
'nitime',
'nipype>=1.1.3',
'nipype>=1.1.4',
'niworkflows==0.4.4',
'statsmodels',
'seaborn',
Expand Down
2 changes: 2 additions & 0 deletions fmriprep/workflows/bold/stc.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def init_bold_stc_wf(metadata, name='bold_stc_wf'):
tr='{}s'.format(metadata["RepetitionTime"]),
slice_timing=metadata['SliceTiming']),
name='slice_timing_correction')
if 'SliceEncodingDirection' in metadata:
slice_timing_correction.inputs.slice_encoding_direction = metadata['SliceEncodingDirection']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could be as clear (and not hit line length limits) by just adding slice_encoding_direction=metadata.get('SliceEncodingDirection', 'k') to the TShift() call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I have tested the previous version and this looks good

  • same list order, different direction gives different results (as expected)
  • flipped list, flipped direction gives same results (as expected)
  • no direction vs "k" gives same results (as expected)


copy_xform = pe.Node(CopyXForm(), name='copy_xform', mem_gb=0.1)

Expand Down