Skip to content

radiens_core.models.spikesorter

Spike sorter control and status domain models.

Classes

DashElement

Bases: IntEnum

Elements available for the spike sorter dashboard.

InputFeatureType

Bases: IntEnum

Feature types used for spike sorting.

SpikeDetectParams

Bases: BaseModel

Detection parameters for a single recording channel.

All fields are optional to allow for partial updates.

Attributes:

Name Type Description
is_enabled bool | None

Whether detection is enabled on this channel.

ntv_chan_idx int | None

Native channel index (used in return structures, not set via bulk update).

thr list[float] | None

Threshold values in microvolts [neg, pos].

thr_sd list[float] | None

Threshold values in standard deviations [neg, pos].

thr_wdw_pts list[int] | None

Threshold window in points [pre, post, total].

thr_wdw list[float] | None

Threshold window in seconds [pre, post, total].

shadow float | None

Shadow period in seconds.

shadow_pts int | None

Shadow period in points.

is_set_thr list[bool] | None

Whether threshold is set [neg, pos].

weak_thr list[float] | None

Weak threshold values in microvolts [neg, pos].

weak_thr_sd list[float] | None

Weak threshold values in standard deviations [neg, pos].

SpikeSorterClustererParams

Bases: BaseModel

Parameters for the spike clustering algorithm.

Attributes:

Name Type Description
pos_influence_frac float | None

Influence of spike position on clustering.

wfm_shape_influence_frac float | None

Influence of waveform shape on clustering.

eps float | None

Epsilon parameter for DBSCAN-like clustering.

min_pts int | None

Minimum points for a cluster.

disabled bool

Whether clustering is disabled.

SpikeSorterCommand

Bases: IntEnum

Commands for controlling an active spike sorter.

SpikeSorterCriterionLevel

Bases: IntEnum

Stringency levels for AI evaluation.

SpikeSorterDashboard

Bases: BaseModel

Comprehensive spike sorter dashboard data.

Attributes:

Name Type Description
enabled_ports list[Port]

List of hardware ports with active sorting.

general SpikeSorterDashboardGeneral | None

General summary metrics.

SpikeSorterDashboardGeneral

Bases: BaseModel

General summary metrics for the spike sorter dashboard.

SpikeSorterDynamicConfig

Bases: BaseModel

Configuration for AI dynamic tracking auto-updates.

Attributes:

Name Type Description
is_enabled bool | None

Whether dynamic AI tracking is enabled.

update_period_sec SpikeSorterDynamicUpdatePeriod | None

Schedule for dynamic updates.

criteria SpikeSorterDynamicCriteria | None

Stringency criteria for updates.

SpikeSorterDynamicCriteria

Bases: BaseModel

Criteria stringency levels for AI auto-updates.

SpikeSorterDynamicUpdatePeriod

Bases: BaseModel

Update periods in seconds for AI auto-updates.

SpikeSorterFeatureParams

Bases: BaseModel

Parameters for feature extraction during spike sorting.

Attributes:

Name Type Description
num_features int

Number of features to extract.

feature_type InputFeatureType

Type of features to extract.

latent_dim int | None

Latent dimension for feature reduction.

resample_wfm_len int | None

Length to resample waveforms to.

SpikeSorterLaunchParams

Bases: BaseModel

Parameters for launching a new spike sorter.

Attributes:

Name Type Description
dsource_id str | None

ID of the data source to sort (required for file sorting).

discover_noise bool

Whether to perform noise discovery.

is_auto_on bool

Whether to automatically start sorting after launch.

nbr_pattern int | None

Neighbor pattern for multi-channel sorting.

sink_dsrc_id str | None

ID for the resultant .spikes file.

sub_cmd SpikeSorterSubCommand

Sub-command for the sorting operation.

clusterer_params SpikeSorterClustererParams | None

Optional clustering parameters.

feature_params SpikeSorterFeatureParams | None

Optional feature extraction parameters.

SpikeSorterLaunchResult

Bases: BaseModel

Result of a spike sorter launch request.

Attributes:

Name Type Description
spike_sorter_id str

Unique ID of the launched sorter.

sorter_type SpikeSorterType

Type of the launched sorter.

msg str

Status message from the server.

SpikeSorterParamCommand

Bases: IntEnum

Commands for updating individual spike sorter detection parameters.

SpikeSorterState

Bases: BaseModel

Current state and progress of a spike sorter.

Attributes:

Name Type Description
sys SpikeSorterStateSystem

Overall system state (ON, OFF, NOT_CONFIGURED).

frac_complete float

Fraction of the current operation completed (0.0 to 1.0).

is_on bool

Whether the sorter is currently active.

msg str

Status message from the server.

error_msg str

Error message if the sorter is in an error state.

warn_msg str

Warning message from the server.

SpikeSorterStateSystem

Bases: IntEnum

Overall system state of a spike sorter.

SpikeSorterSubCommand

Bases: IntEnum

Sub-commands for spike sorter operations.

SpikeSorterType

Bases: IntEnum

Supported spike sorter types.