pyns.fetch_utils.fetch_predictors

pyns.fetch_utils.fetch_predictors(predictor_names, dataset_name, return_type='df', rescale=False, resample=True, api=None, **entities)

Fetch predictors from Neuroscout API, and return as a BIDSRunVariableCollection or pandas DataFrame

Args:

predictor_names (str): Mame of predictors to fetch. dataset_name (str): Name of dataset to fetch predictors from. return_type (str): Either ‘df’ or ‘BIDSRunVariableCollection’. rescale (bool): Whether to rescale predictors to mean 0, std 1. resample (bool): Whether to resample predictors to TR. api (pyns.Neuroscout): A instance of API (if None, will create one). entities (dict): Entities to filter by. e.g.: ‘subject’, ‘session’, ‘run’.