Open adelavega opened 1 year ago
dataset = load_dataset('bids/tests/data/7t_trt/')
result = query(dataset, 'object', suffix='bold', subject='01')
result[0].get_metadata()
>> {}
The file that fails has the following entities:
{'sub': '01', 'ses': '2', 'task': 'rest', 'acq': 'prefrontal'}
Whereas acq
= fullbrain
does return meta-data.
The difference being there is a single meta-data file for both run 1 and 2 in the fullbrain
scenario.
I think the BIDSMetadata should wrap the metadata returned by its _artifact:
def get_metadata(self):
"""Return all metadata associated with the current file. """
md_file = BIDSMetadata(self.path)
md = self._artifact.get_metadata(include_entities=True)
md_file.update(md)
return md_file
I don't think that's the issue here, it seems like a bug with how ancpbids is implementing the inheritance principle.
In test
test_get_tr
The following occurs:
The meta-data for this file is at the bids root under:
task-rest_acq-prefrontal_bold.json
.@erdalkaraca any insight?