From a26d493e1276f2d67d80701e7e240e932308a100 Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Thu, 19 Aug 2021 13:25:24 -0400 Subject: [PATCH] output eddy files to work dir instead of bids dir --- dmriprep/workflows/dwi/eddy.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dmriprep/workflows/dwi/eddy.py b/dmriprep/workflows/dwi/eddy.py index eb312041..3fb76766 100755 --- a/dmriprep/workflows/dwi/eddy.py +++ b/dmriprep/workflows/dwi/eddy.py @@ -35,7 +35,7 @@ from niworkflows.engine.workflows import LiterateWorkflow as Workflow -def gen_eddy_textfiles(in_file, in_meta): +def gen_eddy_textfiles(in_file, in_meta, newpath=None): """ Generate the acquisition-parameters and index files for FSL ``eddy_openmp``. @@ -58,10 +58,12 @@ def gen_eddy_textfiles(in_file, in_meta): from nipype.utils.filemanip import fname_presuffix # Generate output file name + newpath = Path(newpath or ".") out_acqparams = fname_presuffix( in_file, suffix="_acqparams.txt", use_ext=False, + newpath=str(newpath.absolute()), ) pe_dir = in_meta["PhaseEncodingDirection"] @@ -80,6 +82,7 @@ def gen_eddy_textfiles(in_file, in_meta): in_file, suffix="_index.txt", use_ext=False, + newpath=str(newpath.absolute()), ) Path(out_index).write_text(f"{' '.join(['1'] * nb.load(in_file).shape[3])}") return out_acqparams, out_index @@ -102,7 +105,7 @@ def init_eddy_wf(debug=False, name="eddy_wf"): Outputs ------- out_eddy - The eddy corrected diffusion image.. + The eddy corrected diffusion image """ from nipype.interfaces.fsl import Eddy, ExtractROI