BidsDataset

class BidsDataset(root_path, schema=None, tabular_types=None, exclude_dirs=['sourcedata', 'derivatives', 'code', 'stimuli'])[source]

A BIDS dataset representation primarily focused on HED evaluation.

root_path

Real root path of the BIDS dataset.

Type:

str

schema

The schema used for evaluation.

Type:

HedSchema or HedSchemaGroup

tabular_files

A dictionary of BidsTabularDictionary objects containing a given type.

Type:

dict

Methods

hed.tools.bids.bids_dataset.BidsDataset.__init__(...)

Constructor for a BIDS dataset.

hed.tools.bids.bids_dataset.BidsDataset.get_summary()

Return an abbreviated summary of the dataset.

hed.tools.bids.bids_dataset.BidsDataset.get_tabular_group([...])

Return the specified tabular file group.

hed.tools.bids.bids_dataset.BidsDataset.validate([...])

Validate the specified file group types.

Attributes

BidsDataset.__init__(root_path, schema=None, tabular_types=None, exclude_dirs=['sourcedata', 'derivatives', 'code', 'stimuli'])[source]

Constructor for a BIDS dataset.

Parameters:
  • root_path (str) – Root path of the BIDS dataset.

  • schema (HedSchema or HedSchemaGroup) – A schema that overrides the one specified in dataset.

  • tabular_types (list or None) – List of strings specifying types of tabular types to include. If None or empty, then [‘events’] is assumed.

  • exclude_dirs=['sourcedata'

  • 'derivatives'

  • 'code']

BidsDataset.get_summary()[source]

Return an abbreviated summary of the dataset.

BidsDataset.get_tabular_group(obj_type='events')[source]

Return the specified tabular file group.

Parameters:

obj_type (str) – Suffix of the BidsFileGroup to be returned.

Returns:

The requested tabular group.

Return type:

BidsFileGroup or None

BidsDataset.validate(types=None, check_for_warnings=True)[source]

Validate the specified file group types.

Parameters:
  • types (list) – A list of strings indicating the file group types to be validated.

  • check_for_warnings (bool) – If True, check for warnings.

Returns:

List of issues encountered during validation. Each issue is a dictionary.

Return type:

list