ENH: Drop initial dots from get() calls
@@ -1350,13 +1350,13 @@ class BIDSLayout(object):
def get_bvec(self, path, **kwargs):
"""Get bvec file for passed path."""
- result = self.get_nearest(path, extension='bvec', suffix='dwi',
+ result = self.get_nearest(path, extension='.bvec', suffix='dwi',
all_=True, **kwargs)
return listify(result)[0]
def get_bval(self, path, **kwargs):
"""Get bval file for passed path."""
- result = self.get_nearest(path, suffix='dwi', extension='bval',
+ result = self.get_nearest(path, suffix='dwi', extension='.bval',
all_=True, **kwargs)
return listify(result)[0]
@@ -1384,7 +1384,7 @@ class BIDSLayout(object):
fieldmap_set = []
suffix = '(phase1|phasediff|epi|fieldmap)'
files = self.get(subject=sub, suffix=suffix, regex_search=True,
- extension=['nii.gz', 'nii'])
+ extension=['.nii.gz', '.nii'])
for file in files:
metadata = self.get_metadata(file.path)
if metadata and "IntendedFor" in metadata.keys():
@@ -1445,7 +1445,7 @@ class BIDSLayout(object):
# Constrain search to functional images
filters.update(suffix='bold', datatype='func')
scope = 'all' if derivatives else 'raw'
- images = self.get(extension=['nii', 'nii.gz'], scope=scope,
+ images = self.get(extension=['.nii', '.nii.gz'], scope=scope,
**filters)
if not images:
raise NoMatchError("No functional images that match criteria found.")
