ingest
Reading a recording for an ingest: the SHA-256 of its header and its annotations.
The ingest container runs :func:read_recording on the runner's copy of a
recording. The platform runs :func:header_sha256 on the header a client
registered. The two are equal when the stored file has the registered header.
NotAnEdfRecording
¶
Bases: ValueError
The file does not start with a whole EDF header.
header_sha256(data)
¶
Return the SHA-256 of the EDF header at the start of data.
The header is the fixed header and every signal header; any bytes after it are ignored.
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
read_recording(path, *, annotation_text)
¶
Read what an ingest reports about the EDF or EDF+ file at path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
The file, as the container sees it: after the rule. |
required |
annotation_text
|
bool
|
Keep the text of annotations that match no label. |
required |
Annotations that are malformed, or outside the recording, are left out; only the header can make a file unreadable.
Raises:
| Type | Description |
|---|---|
NotAnEdfRecording
|
If the file does not start with a whole EDF header. |