radiens_core.models.provenance
Provenance domain models: the ordered account of how a dataset came to be.
| CLASS | DESCRIPTION |
|---|---|
Provenance |
Everything known about how a dataset came to be. |
ProvenanceAcquire |
Where a dataset's samples came from. |
ProvenanceDecimate |
A change of sample rate by resampling. |
ProvenanceFilter |
One filter that shaped the samples. |
ProvenanceFilterStructure |
How a recorded filter's coefficients are laid out. |
ProvenanceOp |
One operation applied to a dataset's samples. |
ProvenanceOpKind |
What an operation did. |
ProvenanceOrigin |
What produced an operation. |
ProvenanceRecord |
The ordered account of what shaped a dataset's samples. |
ProvenanceRemapSensor |
A change of which probe and headstage each port carries. |
ProvenanceSelectChannels |
A selection of channels. |
ProvenanceSliceTime |
A trim in time. |
ProvenanceSort |
The spike sort that labeled a fileset. |
ProvenanceWrite |
Where the stream was persisted as a dataset. |
SensorAssignment |
One port's probe and headstage. |
TimestampRange |
A half-open range of hardware timestamps. |
Classes
Provenance
Bases: BaseModel
Everything known about how a dataset came to be.
Every operation in record altered the stored samples. stage2_dsp did not: it is
applied when the data is read.
| ATTRIBUTE | DESCRIPTION |
|---|---|
record |
What shaped the samples. For a dataset written before records existed, it is
reconstructed from older metadata and marked
TYPE:
|
stage2_dsp |
The stage-2 chain in force when recording started. Empty for anything that is not a recording, and for a recording written before the chain was recorded.
TYPE:
|
ProvenanceAcquire
Bases: BaseModel
Where a dataset's samples came from.
A recording may set the first two fields and an import the last two, never both.
| ATTRIBUTE | DESCRIPTION |
|---|---|
backbone_mode |
Acquisition system that digitized a recording
(
TYPE:
|
allego_version |
Version of the Allego app that drove the recording.
TYPE:
|
source_type |
Format an imported dataset was read out of (
TYPE:
|
source_name |
The foreign dataset's name on disk, never a path.
TYPE:
|
ProvenanceDecimate
ProvenanceFilter
Bases: BaseModel
One filter that shaped the samples.
| ATTRIBUTE | DESCRIPTION |
|---|---|
type |
Filter type.
TYPE:
|
fs |
Sample rate the filter was designed at, in Hz. A cutoff recorded before a decimate cannot be read against the dataset's current rate without it.
TYPE:
|
freq_spec |
Realized cutoffs in Hz — one for lowpass, highpass and notch, two for bandpass and bandstop. Each is the family's own reference level: the half-power point for Butterworth, the ripple band edge for Chebyshev-I. Never a requested passband edge. |
notch_bandwidth |
Notch width in Hz.
TYPE:
|
filter_order |
Filter order.
TYPE:
|
family |
IIR design family.
TYPE:
|
ripple_db |
Chebyshev-I passband ripple in dB.
TYPE:
|
zero_phase |
Whether the filter ran forward and backward.
TYPE:
|
port |
Port the filter ran on.
TYPE:
|
ref_ntv_chan_idx |
Reference channel, for a referencing filter.
TYPE:
|
target_ntv_chan_idx |
Target channel, for a paired reference.
TYPE:
|
structure |
How
TYPE:
|
b |
Numerator coefficients; three per section when |
a |
Denominator coefficients; three per section when |
ProvenanceFilterStructure
Bases: IntEnum
How a recorded filter's coefficients are laid out.
| ATTRIBUTE | DESCRIPTION |
|---|---|
UNSPECIFIED |
Unknown: the built filter was not available to read. Does not mean direct form.
|
DIRECT |
Direct-form transfer function coefficients.
|
SOS |
Second-order sections.
|
ProvenanceOp
Bases: BaseModel
One operation applied to a dataset's samples.
kind says which detail field is set; the rest are None.
| ATTRIBUTE | DESCRIPTION |
|---|---|
kind |
What the operation did.
TYPE:
|
origin |
What produced it.
TYPE:
|
node_id |
Identifies the protocol node that produced it. Operations from one node share
it.
TYPE:
|
protocol_id |
ID of the curate protocol that applied it.
TYPE:
|
server_version |
Version of the Radiens server that performed it.
TYPE:
|
filter |
Set when
TYPE:
|
decimate |
Set when
TYPE:
|
select_channels |
Set when
TYPE:
|
remap_sensor |
Set when
TYPE:
|
slice_time |
Set when
TYPE:
|
write |
Set when
TYPE:
|
sort |
Set when
TYPE:
|
acquire |
Set when
TYPE:
|
ProvenanceOpKind
Bases: StrEnum
What an operation did.
For every kind except DETECT, MEASURE and UNKNOWN, the ProvenanceOp field of
the same name holds the detail.
| ATTRIBUTE | DESCRIPTION |
|---|---|
FILTER |
Applied a filter or reference.
|
DECIMATE |
Reduced the sample rate.
|
SELECT_CHANNELS |
Kept a subset of channels.
|
REMAP_SENSOR |
Replaced the probe map.
|
SLICE_TIME |
Kept a time range.
|
WRITE |
Wrote a dataset to a file.
|
DETECT |
Detected spikes. A spikes fileset's own spec holds the detector's thresholds.
|
MEASURE |
Measured KPI metrics. A KPI fileset's own records hold the parameters it measured with.
|
SORT |
Sorted spikes.
|
ACQUIRE |
Where the samples came from: the system that digitized a recording, or the foreign file an imported dataset was read out of. When present, it is the first operation.
|
UNKNOWN |
Written by a newer backend than this client models. The origin and node are still readable; the detail is not.
|
ProvenanceOrigin
Bases: IntEnum
What produced an operation.
| ATTRIBUTE | DESCRIPTION |
|---|---|
UNKNOWN |
Not attributable. Files from older servers record acquisition and curation filters in one list, so those filters report this.
|
HARDWARE |
The acquisition system: its hardware filters, and the
|
ACQUISITION_STAGE1 |
Stage 1 filters applied during acquisition.
|
SPIKE_SORT |
The spike sorter, including the filters spikes were detected through.
|
CURATE |
A curation transform or protocol.
|
KPI |
KPI measurement.
|
IMPORT |
Reading a file written by other software. Marks the
|
ProvenanceRecord
Bases: BaseModel
The ordered account of what shaped a dataset's samples.
| ATTRIBUTE | DESCRIPTION |
|---|---|
version |
Schema version the record was written at.
TYPE:
|
ops |
Operations in the order they were applied.
TYPE:
|
reconstructed |
Whether the operations were assembled from older metadata, in which case a missing detail could not be recovered. A dataset derived from a reconstructed one is also marked reconstructed.
TYPE:
|
ProvenanceRemapSensor
Bases: BaseModel
A change of which probe and headstage each port carries.
| ATTRIBUTE | DESCRIPTION |
|---|---|
prior |
Assignments before the remap.
TYPE:
|
assigned |
Assignments after it.
TYPE:
|
ProvenanceSelectChannels
ProvenanceSliceTime
Bases: BaseModel
A trim in time.
| ATTRIBUTE | DESCRIPTION |
|---|---|
source |
Timestamp range of the dataset that was trimmed.
TYPE:
|
retained |
Timestamp range kept.
TYPE:
|
ProvenanceSort
Bases: BaseModel
The spike sort that labeled a fileset.
| ATTRIBUTE | DESCRIPTION |
|---|---|
seed |
Seed of the sort's random draws. Pass it as
TYPE:
|
clusterer_params |
The launch's clusterer params as sent.
TYPE:
|
feature_params |
The launch's feature params as sent, with the same
TYPE:
|
ProvenanceWrite
Bases: BaseModel
Where the stream was persisted as a dataset.
Names the ancestor the following operations were applied to.
| ATTRIBUTE | DESCRIPTION |
|---|---|
dataset_uid |
UID of the dataset written.
TYPE:
|
file_type |
File type written.
TYPE:
|