-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add correctFieldMapCase4 to support pepolar fieldmaps #39
Conversation
Create correctFieldMapJsonCase4.py for populating IntendedFor field in peploar fieldmap jsons. Based on correctFieldMapJsonCase2.py.
Create correctFieldMapJsonCase4 for running correctFieldMapJsonCase4.py. Based on correctFieldMapJsonCase2.
Create correctFieldMapCase4.py for populating IntendedFor field in pepolar fieldmap json files. Based on correctFieldMapCase2.py.
Fix debug print statement syntax. Also, hard code dir- field to dir-PA in os.path.join statement. Need to figure out something more flexible...
Add for loop with glob to grab all acq-EPI_dir-*_epi.json files and add func files to IntendedFor section.
Fix syntax error to call glob.glob instead of glob module directly.
Add correctFieldMapCase4 to support pepolar fieldmaps
Add memp2rage_bids_corrector.py script to tar2bids run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor style things but it looks to me like this will do what's intended.
As we discussed on Slack, correctFieldMapCase4
will never get called, but we can address that in a separate PR.
if ses: #ses not None | ||
sub_prefix = '{}_{}'.format(sub,ses) | ||
sub_path_prefix=os.path.join(sub,ses) | ||
sub_root = '{}'.format(sub) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can just be sub_root = sub
(or maybe sub_root = str(sub)
if sub
might not already be a string).
Actually, you may just want to get rid of this variable entirely because it seems to be the same as sub
in all cases.
fmri_json = json.load(f,object_pairs_hook=collections.OrderedDict) | ||
|
||
# apply to all bold images | ||
cwd=os.getcwd() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we're changing the working directory to get the paths relative to the participant directory? I try to avoid changing directories if possible (can cause problems e.g. if the script fails or is cancelled part way through) but if this is the easiest way to do it, that's fine.
Add call to correctFieldMapCase4 to tar2bids to create and populated IntendedFor field in fMRI pepolar fieldmaps.
Add call to correctFieldMapCase4 to tar2bids
The additional changes also look good and this all seems in line with what's already in tar2bids, so I'm going to go ahead and merge. |
Add correctFieldMapCase4 and correctFieldMapJsonCase4.py to populate IntendedFor field in pepolar fieldmap json files. Assumes acquisition field is set to acq-EPI. Direction field is set to wildcard.