readbdf#

readbdf(dataset, records, mode=0)#

Read selected 1-based BDF records.

Modes 0 and 2 apply physical calibration; odd modes retain raw digital values. Modes 2 and 3 compact each channel’s variable-length records at that channel’s own samples-per-record stride, matching EEGLAB.

Parameters:
  • dataset (dict[str, Any]) – Structure returned by openbdf().

  • records (Any) – Scalar or array of EEGLAB-facing 1-based record numbers.

  • mode (int) – Legacy record layout and calibration mode (0 through 3).

Returns:

(updated_dataset, last_raw_record). Record in the updated dataset is channel-major; the raw record is sample-major.

Return type:

tuple[dict[str, Any], ndarray]