API Reference

bids.layout: Querying BIDS datasets

bids.layout

bids.layout.BIDSLayout([root, validate, ...])

Layout class representing an entire BIDS dataset.

bids.layout.BIDSValidator([index_associated])

Object for BIDS (Brain Imaging Data Structure) verification.

bids.layout.BIDSFile(filename)

Represents a single file or directory in a BIDS dataset.

bids.layout.BIDSDataFile(filename)

Represents a single data file in a BIDS dataset.

bids.layout.BIDSJSONFile(filename)

Represents a single JSON metadata file in a BIDS dataset.

bids.layout.Config(name[, entities, ...])

Container for BIDS configuration information.

bids.layout.Entity(name[, pattern, ...])

Represents a single entity defined in the JSON config.

bids.layout.Tag(file, entity, value[, ...])

Represents an association between a File and an Entity.

bids.layout.parse_file_entities(filename[, ...])

Parse the passed filename for entity/value pairs.

bids.layout.add_config_paths(**kwargs)

Add to the pool of available configuration files for BIDSLayout.

bids.layout.index.BIDSLayoutIndexer([...])

Indexer class for BIDSLayout.

bids.layout.writing

Contains helper functions that involve writing operations.

bids.modeling: Model specification for BIDS datasets

bids.modeling

bids.modeling.statsmodels

BIDS-StatsModels functionality.

bids.modeling.auto_model(layout[, ...])

Create a simple default model for each of the tasks in a BIDSLayout.

bids.modeling.statsmodels.BIDSStatsModelsGraph(...)

Rooted graph structure representing the contents of a BIDS-StatsModel file.

bids.modeling.statsmodels.BIDSStatsModelsNode(...)

Represents a single node in a BIDS-StatsModel graph.

bids.reports: Data acquisition report generation

bids.reports

bids.reports.BIDSReport(layout[, config])

Generate publication-quality data acquisition section from BIDS dataset.

bids.reports.parsing

Parsing functions for generating BIDSReports.

bids.reports.parameters

Functions for building strings for individual parameters.

bids.reports.utils

Generate publication-quality data acquisition methods section from BIDS dataset.

bids.variables: Variables

bids.variables

bids.variables.SimpleVariable(name, data, ...)

Represents a simple design matrix column that has no timing information.

bids.variables.SparseRunVariable(name, data, ...)

A sparse representation of a single column of events.

bids.variables.DenseRunVariable(name, ...)

A dense representation of a single column.

bids.variables.BIDSVariableCollection(variables)

A container for one or more variables extracted from variable files at a single level of analysis.

bids.variables.BIDSRunVariableCollection(...)

A container for one or more RunVariables--i.e., Variables that have a temporal dimension.

bids.variables.merge_collections(collections)

Merge two or more collections at the same level of analysis.

bids.variables.load_variables(layout[, ...])

A convenience wrapper for one or more load_*_variables() calls.

bids.variables.merge_variables(variables, ...)

Merge/concatenate a list of variables along the row axis.

bids.variables.io

Tools for reading/writing BIDS data files.

bids.variables.entities

Data classes for internal BIDS data hierarchy.

bids.variables.collections

Classes and functions related to the management of sets of BIDSVariables.

bids.variables.variables

Classes for representing BIDS variables.

bids.config: PyBIDS Configuration utilities

bids.config

Utilities for manipulating package-level settings.

bids.config.set_option(key, value)

Set a package-wide option.

bids.config.set_options(**kwargs)

Set multiple package-wide options.

bids.config.get_option(key)

Retrieve the current value of a package-wide option.

bids.config.from_file(filenames[, ...])

Load package-wide settings from specified file(s).

bids.config.reset_options([update_from_file])

Reset all options to the package defaults.

bids.utils: Utility functions

bids.utils

Utility functions.

bids.utils.listify(obj)

Wraps all non-list or tuple objects in a list; provides a simple way to accept flexible arguments.

bids.utils.matches_entities(obj, entities[, ...])

Checks whether an object's entities match the input.

bids.utils.convert_JSON(j)

Recursively convert CamelCase keys to snake_case.

bids.utils.make_bidsfile(filename)

Create a BIDSFile instance of the appropriate class.