diff --git a/MRdataset/bids.py b/MRdataset/bids.py index 77c538a..ea674b8 100644 --- a/MRdataset/bids.py +++ b/MRdataset/bids.py @@ -131,11 +131,11 @@ def _process(self, folder): sequences.append(seq) else: if name not in SUPPORTED_BIDS_DATATYPES: - logger.error(f'MRdataset primarily supports ' - f'{SUPPORTED_BIDS_DATATYPES}' - f'It seems the parameters in ' - f'this sequence are invalid or ' - f'not supported yet. Skipping it.') + logger.warning(f'MRdataset primarily supports ' + f'{SUPPORTED_BIDS_DATATYPES} .' + f'It seems the parameters in ' + f'this sequence are invalid or ' + f'not supported yet. Skipping it.') return sequences @staticmethod diff --git a/MRdataset/dicom_utils.py b/MRdataset/dicom_utils.py index 7ba50f7..4d1a02d 100644 --- a/MRdataset/dicom_utils.py +++ b/MRdataset/dicom_utils.py @@ -33,6 +33,15 @@ def is_bids_file(filename: Union[str, Path]): return False if 'sourcedata' in str(filename): return False + + # TODO: Add support for physiological and other continuous + # recordings. Skip for now. + # See : https://bids-specification.readthedocs.io/en/stable/modality-specific-files/physiological-and-other-continuous-recordings.html # noqa + # Example dataset on OpenNeuro : ds002785 + if '_physio.' in str(filename): + return False + if '_stim.' in str(filename): + return False # Regular expression pattern pattern = r'sub-[^_]+' # Extracting substring using regex