Skip to content

Commit e811b96

Browse files
author
Shoshana Berleant
committed
save outputs to cwd
1 parent 73b9a0e commit e811b96

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

nipype/algorithms/confounds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def _run_interface(self, runtime):
423423
mask = mask.astype(int).T
424424

425425
# save mask
426-
mask_file = 'mask.nii'
426+
mask_file = os.path.abspath('mask.nii')
427427
nb.nifti1.save(nb.Nifti1Image(mask, np.eye(4)), mask_file)
428428
IFLOG.debug('tCompcor computed and saved mask of shape {} to mask_file {}'
429429
.format(mask.shape, mask_file))

nipype/interfaces/nilearn.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
'''
1414
from __future__ import (print_function, division, unicode_literals,
1515
absolute_import)
16+
import os
1617

1718
import numpy as np
1819
import nibabel as nb
@@ -85,7 +86,7 @@ def _run_interface(self, runtime):
8586
output = np.vstack((self.inputs.class_labels, region_signals.astype(str)))
8687

8788
# save output
88-
np.savetxt(self.inputs.out_file, output, fmt=b'%s', delimiter='\t')
89+
np.savetxt(os.path.abspath(self.inputs.out_file), output, fmt=b'%s', delimiter='\t')
8990
return runtime
9091

9192
def _process_inputs(self):

0 commit comments

Comments
 (0)