diff --git a/heudiconv/heuristics/reproin.py b/heudiconv/heuristics/reproin.py index 33b1a7b6..c529ca6d 100644 --- a/heudiconv/heuristics/reproin.py +++ b/heudiconv/heuristics/reproin.py @@ -199,6 +199,10 @@ "TODO: adjust to your case.", } +POPULATE_INTENDED_FOR_OPTS = { + 'matching_parameters': ['ImagingVolume', 'Shims'], + 'criterion': 'Closest' +} def _delete_chars(from_str, deletechars): """ Delete characters from string allowing for Python 2 / 3 difference diff --git a/heudiconv/tests/test_convert.py b/heudiconv/tests/test_convert.py index c9674c22..06b60ae8 100644 --- a/heudiconv/tests/test_convert.py +++ b/heudiconv/tests/test_convert.py @@ -229,13 +229,14 @@ def mock_populate_intended_for(session, matching_parameters='Shims', criterion=' output = capfd.readouterr() # if the heuristic module has a 'POPULATE_INTENDED_FOR_OPTS' field, we expect # to get the output of the mock_populate_intended_for, otherwise, no output: - if getattr(heuristic, 'POPULATE_INTENDED_FOR_OPTS', None): + pif_cfg = getattr(heuristic, 'POPULATE_INTENDED_FOR_OPTS', None) + if pif_cfg: assert all([ "\n".join([ "session: " + outfolder.format(sID=s, ses=sesID), # "ImagingVolume" is defined in heuristic file; "Shims" is the default - "matching_parameters: " + "ImagingVolume", - "criterion: Closest" + f"matching_parameters: {pif_cfg['matching_parameters']}", + f"criterion: {pif_cfg['criterion']}" ]) in output.out for s in subjects ])