Skip to content

Commit

Permalink
Fixed location of GRE scans-- should go under anat
Browse files Browse the repository at this point in the history
  • Loading branch information
jcohenadad committed Dec 21, 2023
1 parent 270f307 commit 1e46f3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bids_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
file = [os.path.join(path_in, 'MPRAGE', f) for f in os.listdir(os.path.join(path_in, 'MPRAGE')) if shimtype in f and f.endswith(ext)][0]
shutil.copy2(file, os.path.join(path_out, f'anat/sub-{subject}_acq-{shimtype_dict[shimtype]}_T1w.{ext}'))

# Convert GRE data
# Convert files in GRE_B1 subfolder
# Get the absolute file name of the NIfTI and JSON files under each subfolder of the GRE_B1 subfolder that has the string corresponding to the name of the subfolder in it, and that has the string "gre2d" in it. Select the first pair in the list.
for shimtype in ['CVred', 'Noshim']:
for ext in ['nii.gz', 'json']:
# Convert GRE data
file = [os.path.join(path_in, 'GRE_B1', shimtype, f) for f in os.listdir(os.path.join(path_in, 'GRE_B1', shimtype)) if 'gre2d' in f and f.endswith(ext)][0]
shutil.copy2(file, os.path.join(path_out, f'fmap/sub-{subject}_acq-{shimtype_dict[shimtype]}_T2starw.{ext}'))
shutil.copy2(file, os.path.join(path_out, f'anat/sub-{subject}_acq-{shimtype_dict[shimtype]}_T2starw.{ext}'))
# Convert RF map data



0 comments on commit 1e46f3d

Please sign in to comment.