Skip to content

channels

Channel requirement models for analysis input specifications.

ChannelRequirement pydantic-model

Bases: BaseModel

Base channel type & requirement spec used in e.g., ExactChannel and ChannelType.

Fields:

requirements pydantic-field

The requirements for the channel type.

type pydantic-field

The type of channel that the analysis expects, e.g., 'EEG'.

ChannelRequirements pydantic-model

Bases: BaseModel

Channel requirements for the analysis.

Fields:

quality pydantic-field

Signal-quality requirements the platform checks before the channel is passed to the analysis. Empty, the default, means none.

sampling_rate pydantic-field

The minimum and maximum sampling rate of the channel in Hz.

ChannelSlot pydantic-model

Bases: BaseModel

One ordered, labelled input position within a channel-type requirement.

Slots give a fixed-count requirement per-position identity: "one left EOG and one right EOG" instead of "two arbitrary EOGs". The binding contract is positional — the platform passes the resolved channel names to the analysis in slot order, so slot 0's channel is always the first name of its type, slot 1's the second, and so on.

Fields:

label pydantic-field

Short stable identifier for the slot, e.g. 'eog-left'. Names the position for documentation and future per-slot arguments; the binding itself is positional.

laterality = None pydantic-field

Which body side the slot's signal must come from. The platform infers each candidate channel's laterality from its name and binds accordingly; when inference cannot decide, the submission must select channels explicitly (in slot order). None = the slot accepts either side.

ChannelTypeRequirement pydantic-model

Bases: ChannelRequirement

Represents a channel type (e.g., EEG or EOG) that the analysis expects.

Fields:

Validators:

number pydantic-field

The minimum and maximum number of channels of the given type that the analysis expects.

slots = None pydantic-field

Optional ordered slots giving each expected channel of this type a labelled position (and optionally a required laterality). Only meaningful for fixed-count requirements: when set, 'number' must be exactly [len(slots), len(slots)]. Channels are passed to the analysis in slot order.

validate_slots() pydantic-validator

Slots imply a fixed count that matches the declared number range.

ExactChannelRequirement pydantic-model

Bases: ChannelRequirement

An exact channel (a montage such as C3-M2) that the analysis expects.

Matched by identity, not by string: the platform reads every recording label into a canonical form, so C3-M2 here matches C3-A2, C3M2 and EEG C3-M2 in a file. any_of lists acceptable alternatives in order of preference. A montage the file does not carry is prepared before upload; the platform does not derive channels.

Fields:

Validators:

  • _alternatives_are_distinct

any_of pydantic-field

Alternatives accepted in place of name, in order of preference; the first one present in the recording is used, e.g. ['C4-M1'] for a requirement named 'C3-M2'.

name pydantic-field

The canonical name of the channel the analysis expects, e.g. 'C3-M2'. Matched against each recording channel's canonical identity.

QualityRequirement pydantic-model

Bases: BaseModel

Data quality requirements for a channel.

Fields:

method pydantic-field

The method used to calculate the quality metric. These methods are implemented by the platform and not by the individual analyses.

mode pydantic-field

The mode in which the quality metric is calculated and used. Modes can be 'global' or 'per_epoch'. If global, the channel cannot be passed to the analysis if the whole-recording quality is below the min_quality. If per_epoch, the channel can be passed to the analysis. If 'per_epoch', the analysis will receive the channel but the platform will indicate that any events within epochs with quality below min_quality should be considered uncertain.

score pydantic-field

The range of acceptable values for the quality metric.

RecordingInput pydantic-model

Bases: BaseModel

Defines a recording type input for the analysis.

Fields:

Validators:

allow_multiple = False pydantic-field

Whether the analysis supports multiple input files passed as a list of paths to 'argument' (see default parameters). Default is False, in which case a single path is passed.

channel_types = [] pydantic-field

The list of channel types that the analysis expects and their requirements. Can be None if the analysis does not support general channels by types but requires exact channel deriviations only (see channels).

channels = [] pydantic-field

The list of exact channels deriviations that the analysis expects and their requirements. Can be None if the analysis does not require any specific channels but any channels of certain types (see channel_types).

description = None pydantic-field

A brief description of the input.

format = FileFormat.EDF pydantic-field

The format of the input file, e.g., 'edf'.

minimum_duration_seconds = 1 pydantic-field

The minimum duration of the input in seconds. Must be greater than 0.

validate_channels(data) pydantic-validator

Validate that at least one of 'channels' and 'channel_types' is set.