Currently, you can get valid entities by running BIDSLayout(bids_root).entities and a little parsing. It would be nice to have a helper function such as bids.layout.list_entities():
def list_entities(domains=('bids',)):
res = []
for domain in domains:
res.extend(...) # Parse the entities from the JSON files
return res
The reason this comes up is that, currently, nipype.interfaces.io.BIDSDataGrabber manually parses the JSON files, found in a path relative to bids.__file__. This isn't great.
Currently, you can get valid entities by running
BIDSLayout(bids_root).entitiesand a little parsing. It would be nice to have a helper function such asbids.layout.list_entities():The reason this comes up is that, currently,
nipype.interfaces.io.BIDSDataGrabbermanually parses the JSON files, found in a path relative tobids.__file__. This isn't great.