radiens_core.models.stim
Stimulation domain models and enums.
| CLASS | DESCRIPTION |
|---|---|
StimKeypressIndex |
Keypress trigger number, 1-8. |
StimParams |
Stimulation parameters for a single channel. |
StimPolarity |
Stimulation polarity. |
StimPulseMode |
Stimulation pulse mode. |
StimShape |
Stimulation waveform shape. |
StimStep |
Stimulation step size. |
StimStepState |
Current stimulation step size setting. |
StimTriggerEdgeOrLevel |
Stimulation trigger edge/level mode. |
StimTriggerHighOrLow |
Stimulation trigger high/low. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
FlexStimKeypressIndex |
|
Attributes
FlexStimKeypressIndex
module-attribute
FlexStimKeypressIndex = StimKeypressIndex | int
StimKeypressIndex that also accepts a keypress number (1-8).
Classes
StimKeypressIndex
StimParams
Bases: BaseModel
Stimulation parameters for a single channel.
All timing values are in microseconds (μs). Amplitudes are in μA for amplifier channels and V for DAC channels.
| ATTRIBUTE | DESCRIPTION |
|---|---|
stim_sys_chan_idx |
System channel index.
TYPE:
|
stim_shape |
Stimulation waveform shape. Also accepts
string names (e.g.
TYPE:
|
stim_polarity |
Stimulation polarity. Also accepts
string names (e.g.
TYPE:
|
first_phase_duration |
Duration of the first phase in μs. Defaults to 100.0.
TYPE:
|
second_phase_duration |
Duration of the second phase in μs. Defaults to 100.0.
TYPE:
|
interphase_delay |
Delay between phases in μs. Defaults to 0.0.
TYPE:
|
first_phase_amplitude |
Amplitude of the first phase (μA for amp, V for DAC). Defaults to 0.1.
TYPE:
|
second_phase_amplitude |
Amplitude of the second phase (μA for amp, V for DAC). Defaults to 0.0.
TYPE:
|
baseline_voltage |
Baseline voltage in V. Defaults to 0.0.
TYPE:
|
trigger_edge_or_level |
Trigger mode. Also accepts string names. Defaults to StimTriggerEdgeOrLevel.EDGE.
TYPE:
|
trigger_high_or_low |
Trigger polarity. Also accepts string names. Defaults to StimTriggerHighOrLow.HIGH.
TYPE:
|
enabled |
Whether stimulation is enabled for this channel. Defaults to True.
TYPE:
|
post_trigger_delay |
Delay after trigger before stimulation in μs. Defaults to 0.0.
TYPE:
|
pulse_or_train |
Pulse or train mode. Also accepts string names. Defaults to StimPulseMode.SINGLE_PULSE.
TYPE:
|
number_of_stim_pulses |
Number of pulses in a train. Defaults to 1.
TYPE:
|
pulse_train_period |
Period of pulses in a train in μs. Defaults to 0.0.
TYPE:
|
refractory_period |
Refractory period in μs. Defaults to 0.0.
TYPE:
|
pre_stim_amp_settle |
Pre-stimulation amplifier settle time in μs. Defaults to 0.0.
TYPE:
|
post_stim_amp_settle |
Post-stimulation amplifier settle time in μs. Defaults to 0.0.
TYPE:
|
maintain_amp_settle |
Whether to maintain amplifier settle. Defaults to False.
TYPE:
|
enable_amp_settle |
Whether to enable amplifier settle. Defaults to False.
TYPE:
|
headstage_global_amp_settle |
Whether to enable global headstage amp settle. Defaults to False.
TYPE:
|
post_stim_charge_recov_on |
Post-stimulation charge recovery on time in μs. Defaults to 0.0.
TYPE:
|
post_stim_charge_recov_off |
Post-stimulation charge recovery off time in μs. Defaults to 0.0.
TYPE:
|
enable_charge_recovery |
Whether to enable charge recovery. Defaults to False.
TYPE:
|
trigger_source_is_keypress |
Whether the trigger source is a keypress. Defaults to False.
TYPE:
|
trigger_source_idx |
A
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
ValidationError
|
If |
| METHOD | DESCRIPTION |
|---|---|
biphasic |
Create symmetric biphasic stimulation parameters. |
Functions
biphasic
classmethod
biphasic(
*,
amplitude: float,
pulse_duration: float,
polarity: StimPolarity,
stim_sys_chan_idx: int,
trigger_source_idx: int | StimKeypressIndex,
enabled: bool = True,
**overrides: object,
) -> StimParams
Create symmetric biphasic stimulation parameters.
Both phases get the same amplitude and duration. A StimKeypressIndex trigger
sets trigger_source_is_keypress; a plain int is an AIN/DIN system channel index.
| PARAMETER | DESCRIPTION |
|---|---|
amplitude
|
Amplitude of each phase (μA for amplifier channels).
TYPE:
|
pulse_duration
|
Duration of each phase in μs.
TYPE:
|
polarity
|
Which phase comes first.
TYPE:
|
stim_sys_chan_idx
|
System channel index.
TYPE:
|
trigger_source_idx
|
Keypress or AIN/DIN system channel that triggers the stimulation.
TYPE:
|
enabled
|
Whether stimulation is enabled for this channel.
TYPE:
|
**overrides
|
Any other
TYPE:
|