Skip to content

Commit

Permalink
Merge pull request #1038 from emdupre/meepi-test-patch
Browse files Browse the repository at this point in the history
[WIP, TST] Pass ref_file to STC check
  • Loading branch information
oesteban committed Apr 9, 2018
2 parents 5562313 + 76e5a38 commit 1755986
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fmriprep/workflows/bold/base.py
Expand Up @@ -260,7 +260,7 @@ def init_func_preproc_wf(bold_file, ignore, freesurfer,
# Short circuits: (True and True and (False or 'TooShort')) == 'TooShort'
run_stc = ("SliceTiming" in metadata and
'slicetiming' not in ignore and
(_get_series_len(bold_file) > 4 or "TooShort"))
(_get_series_len(ref_file) > 4 or "TooShort"))

# Use T2* as target for ME-EPI in co-registration
if t2s_coreg and not multiecho:
Expand Down Expand Up @@ -798,8 +798,6 @@ def init_func_derivatives_wf(output_dir, output_spaces, template, freesurfer,

def _get_series_len(bold_fname):
from niworkflows.interfaces.registration import _get_vols_to_discard
if isinstance(bold_fname, list): # Multi-echo data
bold_fname = bold_fname[0]
img = nb.load(bold_fname)
if len(img.shape) < 4:
return 1
Expand Down

0 comments on commit 1755986

Please sign in to comment.