Skip to content

radiens_core.models.spikes

Spike sorting and neural recording domain models.

Classes

ChannelSpikeData

Bases: BaseModel

Spike timestamps and neuron labels for a single recording channel.

Attributes:

Name Type Description
ntv_chan_idx int

Native channel index.

timestamps NDArray[float64]

Spike timestamps in seconds, shape (N,).

labels NDArray[int32]

Integer neuron label per spike, shape (N,). Matches the neuron label reported by get_neurons().

waveforms NDArray[float32] | None

Spike waveforms in raw units, shape (N, waveform_n_points), or None if waveforms were not requested.

NeuronInfo

Bases: BaseModel

Descriptive statistics for a single sorted neuron.

Attributes:

Name Type Description
neuron_id str

Unique neuron identifier string.

site_ntv_chan_idx int

Native channel index of the primary recording site.

spike_label str

Neuron label as a string (e.g. "1", "2").

spike_count int

Total number of spikes detected.

spike_rate float

Mean spike rate in Hz.

mean_abs_peak_wfm float

Mean absolute peak waveform amplitude.

snr float

Signal-to-noise ratio.

pos_probe list[float]

Probe coordinate [x, y, z] in microns.

pos_tissue list[float]

Tissue coordinate [x, y, z] in microns.

NeuronSpikeData

Bases: BaseModel

Spike timestamps for a single sorted neuron.

Attributes:

Name Type Description
label int

Integer neuron label. Correlates with NeuronInfo.spike_label (string) from get_neurons().

ntv_chan_idx int

Native channel index of the primary recording site for this neuron. -1 if the channel could not be determined from the spike spec.

timestamps NDArray[float64]

Spike timestamps in seconds, shape (N,).

waveforms NDArray[float32] | None

Spike waveforms in raw units, shape (N, waveform_n_points), or None if waveforms were not requested.

NeuronsResult

Bases: BaseModel

Neuron descriptors organized by recording channel.

Attributes:

Name Type Description
neurons_by_channel dict[int, list[NeuronInfo]]

Map from native channel index to a list of neuron descriptors detected on that channel.

SpikesSpec

Bases: BaseModel

Spike interface metadata for a linked dataset.

Attributes:

Name Type Description
biointerface_id str

Unique identifier for the spike interface; used as spikeSorterID in RPC calls that require it.

dataset_uid str

Dataset UID this spike interface is associated with.

num_neurons int

Total number of sorted neurons across all channels.

num_sites int

Number of recording sites (channels) with spike data.

enabled_channel_indices list[int]

Native channel indices of enabled recording sites, sorted in ascending order.

time_range tuple[float, float]

Full time range of the recording in seconds (start, end).

spike_time_range tuple[float, float]

Time range over which spike data is available in seconds (start, end).