radiens_core.models.stim
Stimulation domain models and enums.
Classes
StimParams
Bases: BaseModel
Stimulation parameters for a single channel.
All timing values are in microseconds (μs). Current amplitudes are in μA for amplifier channels and V for DAC channels.
Attributes:
| Name | Type | Description |
|---|---|---|
stim_sys_chan_idx |
int
|
System channel index (ntvAbsKeyIdx). |
stim_shape |
StimShape
|
Stimulation waveform shape. References StimShape. Defaults to StimShape.BIPHASIC. |
stim_polarity |
StimPolarity
|
Stimulation polarity. References StimPolarity. Defaults to StimPolarity.CATHODIC_FIRST. |
first_phase_duration |
float
|
Duration of the first phase in μs. Defaults to 100.0. |
second_phase_duration |
float
|
Duration of the second phase in μs. Defaults to 100.0. |
interphase_delay |
float
|
Delay between phases in μs. Defaults to 0.0. |
first_phase_amplitude |
float
|
Amplitude of the first phase (μA for amp, V for DAC). Defaults to 0.1. |
second_phase_amplitude |
float
|
Amplitude of the second phase (μA for amp, V for DAC). Defaults to 0.0. |
baseline_voltage |
float
|
Baseline voltage in V. Defaults to 0.0. |
trigger_edge_or_level |
StimTriggerEdgeOrLevel
|
Trigger mode. References StimTriggerEdgeOrLevel. Defaults to StimTriggerEdgeOrLevel.EDGE. |
trigger_high_or_low |
StimTriggerHighOrLow
|
Trigger polarity. References StimTriggerHighOrLow. Defaults to StimTriggerHighOrLow.HIGH. |
enabled |
bool
|
Whether stimulation is enabled for this channel. Defaults to True. |
post_trigger_delay |
float
|
Delay after trigger before stimulation in μs. Defaults to 0.0. |
pulse_or_train |
StimPulseMode
|
Pulse or train mode. References StimPulseMode. Defaults to StimPulseMode.SINGLE_PULSE. |
number_of_stim_pulses |
int
|
Number of pulses in a train. Defaults to 1. |
pulse_train_period |
float
|
Period of pulses in a train in μs. Defaults to 0.0. |
refractory_period |
float
|
Refractory period in μs. Defaults to 0.0. |
pre_stim_amp_settle |
float
|
Pre-stimulation amplifier settle time in μs. Defaults to 0.0. |
post_stim_amp_settle |
float
|
Post-stimulation amplifier settle time in μs. Defaults to 0.0. |
maintain_amp_settle |
bool
|
Whether to maintain amplifier settle. Defaults to False. |
enable_amp_settle |
bool
|
Whether to enable amplifier settle. Defaults to False. |
headstage_global_amp_settle |
bool
|
Whether to enable global headstage amp settle. Defaults to False. |
post_stim_charge_recov_on |
float
|
Post-stimulation charge recovery on time in μs. Defaults to 0.0. |
post_stim_charge_recov_off |
float
|
Post-stimulation charge recovery off time in μs. Defaults to 0.0. |
enable_charge_recovery |
bool
|
Whether to enable charge recovery. Defaults to False. |
trigger_source_is_keypress |
bool
|
Whether the trigger source is a keypress. Defaults to False. |
trigger_source_idx |
int | StimKeypressIndex
|
AIN/DIN system channel index, or keypress number. References StimKeypressIndex if keypress. |
Functions
biphasic
classmethod
Create biphasic stimulation parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
float
|
First phase amplitude (μA for amp channels) |
required |
pulse_duration
|
float
|
Phase duration in microseconds |
required |
polarity
|
StimPolarity
|
Stimulation polarity (cathodic or anodic first) |
required |
stim_sys_chan_idx
|
int
|
System channel index |
required |
**overrides
|
object
|
Override any other StimParams field |
{}
|
Returns:
| Type | Description |
|---|---|
StimParams
|
StimParams configured for biphasic stimulation |
StimPolarity
Bases: IntEnum
Stimulation polarity. Values match proto allego.StimPolarity.
StimPulseMode
Bases: IntEnum
Stimulation pulse mode. Values match proto allego.StimPulseOrTrain.
StimShape
Bases: IntEnum
Stimulation waveform shape. Values match proto allego.StimShape.
StimStep
Bases: IntEnum
Stimulation step size. Values match proto allego.StimStep.
StimStepRequest
Bases: BaseModel
Request to set stimulation step size.
Attributes:
| Name | Type | Description |
|---|---|---|
stim_step |
StimStep
|
Target stimulation step size. References StimStep. |
StimStepState
Bases: BaseModel
Current stimulation step size setting.
Attributes:
| Name | Type | Description |
|---|---|---|
stim_step |
StimStep
|
Current stimulation step size. References StimStep. |
StimTriggerEdgeOrLevel
Bases: IntEnum
Stimulation trigger edge/level mode. Values match proto allego.StimTriggerEdgeOrLevel.
StimTriggerHighOrLow
Bases: IntEnum
Stimulation trigger high/low. Values match proto allego.StimTriggerHighOrLow.