load_json_sidecar#
- brainsets.utils.bids_utils.load_json_sidecar(bids_path)[source]#
Load the JSON sidecar file for a given BIDS file.
The JSON sidecar file contains metadata and additional annotations about a BIDS recording, such as acquisition parameters, device settings, channel information, and other contextual information that supplements the raw data file. Sidecar files are an essential component of BIDS datasets and are typically found alongside the primary data files with the same base name but a .json extension.
For more information on JSON sidecar files, see: EEG: https://bids-specification.readthedocs.io/en/stable/modality-specific-files/electroencephalography.html#sidecar-json-_eegjson iEEG: https://bids-specification.readthedocs.io/en/stable/modality-specific-files/intracranial-electroencephalography.html#sidecar-json-_ieegjson
- Parameters:
bids_path (
None) – A BIDSPath object representing the BIDS file for which to load the JSON sidecar.- Return type:
- Returns:
Dictionary containing the JSON sidecar data.
- Raises:
FileNotFoundError – If no JSON sidecar file is found for the BIDS path.