def rename_fmapp(bids_base, basename):
files = dict()<EOL>for ext in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>fname = '<STR_LIT>'.format(basename, ext)<EOL>src = os.path.join(bids_base, '<STR_LIT>', fname)<EOL>if os.path.exists(src):<EOL><INDENT>dst = src.replace(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'<EOL>)<EOL>logger.debug('<STR_LIT>', src, dst)<EOL>os.rename(src, dst)<EOL>files[ext] = dst<EOL><DEDENT><DEDENT>return files<EOL>
Rename phase fieldmap file to BIDS specification