Skip to content

Commit

Permalink
Merge pull request #13 from smeisler/fmap_sym
Browse files Browse the repository at this point in the history
Allow fmaps to be symlinked
  • Loading branch information
suyashdb authored Aug 1, 2022
2 parents 8640cbe + f1af2f8 commit 1009641
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hcp2bids/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,13 @@ def hcp2bids(input_dir, output_dir, s_link = False):
for fieldmap in fieldmaplist:
parentdir = os.path.split(os.path.dirname(fieldmap))[1]
dst = fmap + parentdir +'_'+ os.path.split(fieldmap)[1]
shutil.copy(fieldmap, dst)

if s_link:
if not os.path.islink(dst):
os.symlink(os.path.realpath(fieldmap), dst)
else:
shutil.copy(fieldmap, dst)

print("done with fMAPs for --", subjects)

func_list = glob.glob(os.path.join(subj_raw, 't*/*tfMRI*'))
Expand Down

0 comments on commit 1009641

Please sign in to comment.