Menu

pycaravel: This module is designed to simplify continuous integration (CI) of data from multiple projects.

Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the gallery for the big picture.

class caravel.parsers.bids.BIDSParser(project, confdir, layoutdir)[source]

Object to retrieve data from a BIDS directory.

Initialize the Caravel class.

Parameters:

project : str

the name of the project you are working on.

confdir : str

the locations of the configuration file of the current project.

layoutdir : str

the location of the pre-generated parsing representations. If None switch to managers mode.

export_layout(name)[source]

Export a layout as a pandas DataFrame.

Parameters:

name : str

the name of the layout.

Returns:

df : pandas DataFrame

the converted layout.

filter_layout(name, extension=None, **kwargs)[source]

Filter the layout by using a combination of key-values rules.

Parameters:

name : str

the name of the layout.

extension : str or list of str

a filtering rule on the file extension.

kwargs : dict

the filtering options.

Returns:

df : pandas DataFrame

the filtered layout.

list_keys(name)[source]

List all the filtering keys available in the layout.

Parameters:

name : str

the name of the layout.

Returns:

keys : list

the layout keys.

list_values(name, key)[source]

List all the filtering key values available in the layout.

Parameters:

name : str

the name of the layout.

key : str

the name of key in the layout.

Returns:

values : list

the key associated values in the layout.

pickling_layout(bids_root, name, outdir, subset=None)[source]

Load the requested BIDS layout and save it as a pickle.

Parameters:

bids_root : str

path to the BIDS folder.

name : str

the name of subfolder to be parsed (the layout name).

outdir : str

the folder where the pickle will be generated.

subset : list of str, default None

a selector to focus only on specific folders.

Returns:

outfile : str

the generated layout representation location.

Follow us

© 2025, Antoine Grigis