neuralset.base.TimedArray¶
- class neuralset.base.TimedArray(*, frequency: float, start: float, data: ndarray | None = None, duration: float | None = None, aggregation: Literal['sum', 'mean'] = 'sum', header: dict[str, Any] | None = None)[source][source]¶
Numpy array annotated with time metadata.
Carries
frequency,start,duration, and an optionalheaderdict for domain-specific attributes (channel names, electrode positions, space info). Time is always the last dimension (whenfrequency > 0).Design rationale
Attaching
frequencyandstartto the array lets extractors handle time slicing uniformly — whether the data is a time series (frequency > 0, slicing by sample indices) or a single static representation (frequency == 0, no time dimension). Slicing and+=handle time alignment automatically (resampling and shifting to a common grid). Data can be backed by memmap for fast access without loading full arrays into memory.