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])

An object for BIDS (Brain Imaging Data Structure) verification in a data.

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[, dtype])

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.analysis: Model specification for BIDS datasets

bids.analysis

bids.analysis.Analysis(layout, model)

Represents an entire BIDS-Model analysis.

bids.analysis.auto_model(layout[, …])

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

bids.analysis.analysis.Step(layout, level, index)

Represents a single analysis step from a BIDS-Model specification.

bids.reports: Data acquisition report generation

bids.reports

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

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

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[, name])

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.