get nearest helper add underscore
@@ -25,7 +25,7 @@ class BIDSLayout(Layout):
# some kind of validation regex.
return True
- def get_nearest_helper(self, path, extension, type=None, **kwargs):
+ def _get_nearest_helper(self, path, extension, type=None, **kwargs):
path = abspath(path)
if path not in self.files:
@@ -42,7 +42,7 @@ class BIDSLayout(Layout):
def get_metadata(self, path, **kwargs):
- potentialJSONs = self.get_nearest_helper(path, '.json', **kwargs)
+ potentialJSONs = self._get_nearest_helper(path, '.json', **kwargs)
merged_param_dict = {}
for json_file_path in reversed(potentialJSONs):
@@ -53,13 +53,13 @@ class BIDSLayout(Layout):
return merged_param_dict
def get_bvec(self, path, **kwargs):
- return self.get_nearest_helper(path, '.bvec', **kwargs)[0]
+ return self._get_nearest_helper(path, '.bvec', **kwargs)[0]
def get_bval(self, path, **kwargs):
- return self.get_nearest_helper(path, '.bval', **kwargs)[0]
+ return self._get_nearest_helper(path, '.bval', **kwargs)[0]
def get_events(self, path, **kwargs):
- return self.get_nearest_helper(path, '.tsv', 'events', **kwargs)[0]
+ return self._get_nearest_helper(path, '.tsv', 'events', **kwargs)[0]
def get_fieldmap(self, path, return_list=False):
fieldmaps = self._get_fieldmaps(path)
