@@ -426,16 +426,15 @@ def ls(study_session, seqinfo):
426
426
# So we just need subdir and file_suffix!
427
427
def infotodict (seqinfo ):
428
428
"""Heuristic evaluator for determining which runs belong where
429
-
430
- allowed template fields - follow python string module:
431
-
429
+
430
+ allowed template fields - follow python string module:
431
+
432
432
item: index within category
433
433
subject: participant id
434
434
seqitem: run number during scanning
435
435
subindex: sub index within group
436
436
session: scan index for longitudinal acq
437
437
"""
438
-
439
438
seqinfo = fix_seqinfo (seqinfo )
440
439
lgr .info ("Processing %d seqinfo entries" , len (seqinfo ))
441
440
and_dicom = ('dicom' , 'nii.gz' )
@@ -841,6 +840,7 @@ def parse_series_spec(series_spec):
841
840
# https://github.com/ReproNim/reproin/issues/14
842
841
# where PU: prefix is added by the scanner
843
842
series_spec = re .sub ("^[A-Z]*:" , "" , series_spec )
843
+ series_spec = re .sub ("^WIP " , "" , series_spec ) # remove Philips WIP prefix
844
844
845
845
# Remove possible suffix we don't care about after __
846
846
series_spec = series_spec .split ('__' , 1 )[0 ]
@@ -889,6 +889,7 @@ def split2(s):
889
889
# sanitize values, which must not have _ and - is undesirable ATM as well
890
890
# TODO: BIDSv2.0 -- allows "-" so replace with it instead
891
891
value = str (value ).replace ('_' , 'X' ).replace ('-' , 'X' )
892
+ value = str (value ).replace ('(' , '{' ).replace (')' , '}' ) # for Philips
892
893
893
894
if key in ['ses' , 'run' , 'task' , 'acq' ]:
894
895
# those we care about explicitly
0 commit comments