read_erpss#

read_erpss(filename)#

Read an ERPSS recording into channel-major microvolt data.

ERPSS files contain a 4096-byte recording header followed by 512-byte block headers and either interleaved signed 16-bit samples or ERPSS delta-compressed samples. Event latencies returned in sample_offset are 1-based, matching EEG dataset event latencies.

Parameters:

filename (str | Path) – ERPSS .RAW or .RDF file.

Returns:

A (data, events, header) tuple. data has shape (nchans, nframes) and is scaled to microvolts when calibration is present. Each event contains sample_offset, event_code, and cond_code.

Raises:

ValueError – If the file header, a block, or compressed data is invalid or truncated.

Return type:

tuple[ndarray, list[dict[str, int]], dict[str, Any]]