Implement an end-to-end solution for interrupted sessions and duplicated fieldmaps
Currently, we have only a short description of dealing with duplicated fieldmaps in the case of interrupted sessions. We should have an end-to-end solution, especially that this situation is expected to happen. I propose to implement the following steps:
-
Delete the obsolete fMRI scans, if they have been exported from the scanner. -
Add _run-<index>
to multiple fieldmaps automatically with BIDScoin map file. Use{run: <<1>>}
construct. This will, however, addrun-1
to the names of the not duplicated fieldmaps too. -
Implement a tool in bids-util scripts to overwrite the automatically assigned IntendedFor
values (which would be correct in case of uninterrupted acquisition). Use Python similarly to updating a JSON file when discarding volumes:d = json.load('input_fmap_file') d.update({'IntendedFor': new_func_files_list}) json.dump(d, open('input_fmap_file', 'w'), indent=4)
Although this is a semi-automatic and not perfect solution, it is better than implementing it fully in a bidsmap file. First, it is more general. Second, implementing different IntendedFor
values depending on the fieldmap run in a bidsmap file, requires to involve explicit subject ids and duplicate the fmap
section.
Edited by Mateusz Pawlik