Skip to content

Commit a26d493

Browse files
committed
output eddy files to work dir instead of bids dir
1 parent f5080e9 commit a26d493

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dmriprep/workflows/dwi/eddy.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from niworkflows.engine.workflows import LiterateWorkflow as Workflow
3636

3737

38-
def gen_eddy_textfiles(in_file, in_meta):
38+
def gen_eddy_textfiles(in_file, in_meta, newpath=None):
3939
"""
4040
Generate the acquisition-parameters and index files for FSL ``eddy_openmp``.
4141
@@ -58,10 +58,12 @@ def gen_eddy_textfiles(in_file, in_meta):
5858
from nipype.utils.filemanip import fname_presuffix
5959

6060
# Generate output file name
61+
newpath = Path(newpath or ".")
6162
out_acqparams = fname_presuffix(
6263
in_file,
6364
suffix="_acqparams.txt",
6465
use_ext=False,
66+
newpath=str(newpath.absolute()),
6567
)
6668

6769
pe_dir = in_meta["PhaseEncodingDirection"]
@@ -80,6 +82,7 @@ def gen_eddy_textfiles(in_file, in_meta):
8082
in_file,
8183
suffix="_index.txt",
8284
use_ext=False,
85+
newpath=str(newpath.absolute()),
8386
)
8487
Path(out_index).write_text(f"{' '.join(['1'] * nb.load(in_file).shape[3])}")
8588
return out_acqparams, out_index
@@ -102,7 +105,7 @@ def init_eddy_wf(debug=False, name="eddy_wf"):
102105
Outputs
103106
-------
104107
out_eddy
105-
The eddy corrected diffusion image..
108+
The eddy corrected diffusion image
106109
107110
"""
108111
from nipype.interfaces.fsl import Eddy, ExtractROI

0 commit comments

Comments
 (0)