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
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 step that produced it. Operations from one protocol 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.
DETECT and MEASURE carry no detail of their own: a spikes fileset's own spec holds the
detector's thresholds, and a kpi fileset's own records hold the parameters it measured with.
ACQUIRE, when present, is the first operation and says where the samples came from: the
system that digitized a recording, or the foreign file an imported dataset was read out of.
UNKNOWN marks an operation written by a newer backend than this client models. The origin
and node are still readable; the detail is not.
ProvenanceOrigin
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
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:
|