signal_core library
Format-agnostic multichannel signal engine: summary pyramids for fast zooming, display filters, re-referencing, channel quality, and random access to the bytes of large recordings.
Pure Dart; everything here works on all platforms, including the web.
Classes
- BlobSourceSpec
- ByteSource
-
Random access to the bytes of a file, wherever they are: a path on
native platforms, a
Blob(e.g. a pickedFile) on the web, or bytes already in memory. - ByteSourceSpec
- How to open an ByteSource, in a form that can be sent to another isolate (e.g. to open a recording in the background).
- BytesSourceSpec
- ChannelQuality
- Signal quality of one channel.
- ChannelRef
- One channel of one stream of a source (e.g. a port of a device, or a stream of a recording).
- ChunkData
- Decoded regular-stream samples of one chunk, indexed by stream.
- ChunkedSignalEngine
- Answers EnvelopeRequests and ReadRequests for a recording split into chunks by a ChunkedSignalIndex, without loading it into memory.
- ChunkedSignalIndex
- What a file format provides so a ChunkedSignalEngine can answer views of a recording: its chunks, the timing of its regular streams, and a summary pyramid per regular stream.
- DerivedProgress
- Progress of building a derived summary in the background.
- DerivedSpec
- Processing applied to a set of channels for display: re-referencing (average, or to chosen channels), high-pass and notch filters (zero-phase), and a mean trace.
- Envelope
- The result of an EnvelopeRequest.
- EnvelopeRequest
- A request for the shape of some channels over a time range, reduced to bins columns (typically one per pixel).
-
ListPrefix<
T> - The first length elements of an append-only list, read-only: a snapshot that costs nothing to take.
- LiveProcessor
- Causal processing of a live stream for display, one block at a time.
- PathSourceSpec
- QualityTracker
- Flags channels whose line noise or amplitude is far above the median of the others (as in the Python live viewer's bad-channel detection).
- ReadRequest
- A request for the full-resolution samples of some channels over a time range. Channels follow the same rules as in EnvelopeRequest.
- SignalChunk
- A byte range of a recording that can be decoded on its own.
- SignalStats
- Min, max, mean and standard deviation of one channel over a run of samples.
- SignalWindow
-
Samples of some channels, evenly spaced: sample
iis atstart + i / samplingRateseconds. Missing values are NaN. - Sos
-
A cascade of second-order IIR sections (biquads), as in SciPy's
sosformat: each section isb0 b1 b2 a0 a1 a2, witha0 == 1. - SosStreamFilter
- Causal filtering of a multi-channel stream whose state carries across calls, e.g. for live data. Starts in steady state for the first sample of each channel, so there is no large DC transient.
- StreamChunkSpan
- Where the samples of one stream lie within a chunk.
- StreamColumns
- Decoded samples of one stream within a chunk, per channel: 64-bit unless the format was asked for SamplePrecision.compact.
- StreamTiming
- Timing and size of one stream of a recording.
- SummaryPyramid
- A summary pyramid of one multi-channel signal: for each bucket of consecutive samples, per channel min, max, mean and standard deviation.
Enums
- ChannelFlag
- How a channel compares with the others.
- SamplePrecision
- How sample values are kept in memory.
Functions
-
applyReference(
List< List< columns, DerivedSpec spec, {int from = 0, int? to}) → voiddouble> > -
Apply the referencing of
spectocolumnsin place, over samplesfromtoto(exclusive). -
averageReference(
List< List< columns, {Set<double> >int> exclude = const {}}) → void -
Re-reference
columns(one list per channel, all the same length) to the mean of the channels not inexclude, in place. Excluded channels are re-referenced too; they only do not contribute to the mean. NaN values are left out of the mean. -
bytesOf(
List< double> values) → int -
Bytes
valuestakes: its typed data size, or 8 per value. -
referenceTo(
List< List< columns, List<double> >int> channels, {int from = 0, int? to}) → void -
Re-reference
columnsto the mean ofchannels, in place, from samplefromtoto(exclusive). Every channel is re-referenced, including those inchannels. NaN values are left out of the mean.