Pybids - retrieve anatomical files from the current Layout

Hi,

Does anyone know if there a way for pybids ‘get’ to return a list of the just the structural data files for a subject. i.e. files /anat/ directory without having to provide individual modality suffixes .

layout.get(subject=‘sub01’, extension=‘nii.gz’, return_type=‘file’)

the above retrieves both functional and anatomical

Thanks

I believe you use suffix= ‘___’

For example, for functional, you would use suffix=‘bold’. I think anat would be suffix=‘T1w’, but it might depend on your sequences.

Sorry @mprati, just saw that you want to exclude modality suffixes… Then I’m not sure.