bluecellulab.stimulus.stimulus¶
Classes
|
Represents the Stimulus created by combining multiple stimuli. |
|
Represents empty stimulus (all zeros) that has no impact on the cell. |
|
|
|
Generates an Ornstein-Uhlenbeck noise signal. |
Factory-compatible Ornstein-Uhlenbeck noise stimulus. |
|
|
Factory-compatible Pulse Stimulus. |
|
Generates a pulse train signal. |
|
|
Factory-compatible Shot Noise Stimulus. |
|
|
Generates a shot noise signal, modeling discrete synaptic events occurring at random intervals. |
Factory-compatible Sinusoidal Stimulus. |
|
|
Generates a sinusoidal current wave. |
|
|
|
|
Factory-compatible Step Noise Stimulus. |
|
|
Generates step noise: A step current with noise variations. |
|
|
|
- class bluecellulab.stimulus.stimulus.CombinedStimulus(dt, time, current)[source]¶
Represents the Stimulus created by combining multiple stimuli.
- Parameters:
dt (
float)time (
ndarray)current (
ndarray)
- property current: ndarray¶
Current values of the stimulus.
- property time: ndarray¶
Time values of the stimulus.
- class bluecellulab.stimulus.stimulus.DelayedZap[source]¶
- classmethod amplitude_based(dt, pre_delay, duration, post_delay, amplitude)[source]¶
Create a DelayedZap stimulus from given time events and amplitude.
- Parameters:
dt (
float) – The time step of the stimulus.pre_delay (
float) – The delay before the start of the step.duration (
float) – The duration of the step.post_delay (
float) – The time to wait after the end of the step.amplitude (
float) – The amplitude of the step.
- Return type:
- classmethod threshold_based(dt, pre_delay, duration, post_delay, threshold_current, threshold_percentage)[source]¶
Creates a SineSpec stimulus with respect to the threshold current.
- Parameters:
dt (
float) – The time step of the stimulus.pre_delay (
float) – The delay before the start of the step.duration (
float) – The duration of the step.post_delay (
float) – The time to wait after the end of the step.threshold_current (
float) – The threshold current of the Cell.threshold_percentage (
float) – Percentage of desired threshold_current amplification.
- Return type:
- class bluecellulab.stimulus.stimulus.Empty(dt, duration)[source]¶
Represents empty stimulus (all zeros) that has no impact on the cell.
This is required by some Stimuli that expect the cell to rest.
- Parameters:
dt (
float)duration (
float)
- property current: ndarray¶
Current values of the stimulus.
- property time: ndarray¶
Time values of the stimulus.
- class bluecellulab.stimulus.stimulus.Flat(dt, duration, amplitude)[source]¶
- Parameters:
dt (
float)duration (
float)amplitude (
float)
- property current: ndarray¶
Current values of the stimulus.
- property time: ndarray¶
Time values of the stimulus.
- class bluecellulab.stimulus.stimulus.OUProcess(dt, duration, tau, sigma, mean, seed=None)[source]¶
Generates an Ornstein-Uhlenbeck noise signal.
- Parameters:
dt (
float)duration (
float)tau (
float)sigma (
float)mean (
float)seed (
Optional[int])
- property current: ndarray¶
Returns the Ornstein-Uhlenbeck noise signal.
- property time: ndarray¶
Returns the time array for the stimulus duration.
- class bluecellulab.stimulus.stimulus.OrnsteinUhlenbeck[source]¶
Factory-compatible Ornstein-Uhlenbeck noise stimulus.
- classmethod amplitude_based(dt, pre_delay, duration, post_delay, tau, sigma, mean, seed=None)[source]¶
Create an Ornstein-Uhlenbeck stimulus from given time events and amplitude.
- Parameters:
dt (
float)pre_delay (
float)duration (
float)post_delay (
float)tau (
float)sigma (
float)mean (
float)seed (
Optional[int])
- Return type:
- classmethod threshold_based(dt, pre_delay, duration, post_delay, mean_percent, sigma_percent, threshold_current, tau, seed=None)[source]¶
Creates an Ornstein-Uhlenbeck stimulus with respect to the threshold current.
- Parameters:
dt (
float)pre_delay (
float)duration (
float)post_delay (
float)mean_percent (
float)sigma_percent (
float)threshold_current (
float)tau (
float)seed (
Optional[int])
- Return type:
- class bluecellulab.stimulus.stimulus.Pulse[source]¶
Factory-compatible Pulse Stimulus.
- classmethod amplitude_based(dt, pre_delay, duration, post_delay, amplitude, frequency, width)[source]¶
Creates a Pulse stimulus from given time events and amplitude.
- Parameters:
dt (
float)pre_delay (
float)duration (
float)post_delay (
float)amplitude (
float)frequency (
float)width (
float)
- Return type:
- classmethod threshold_based(dt, pre_delay, duration, post_delay, threshold_current, threshold_percentage, frequency, width)[source]¶
Creates a Pulse stimulus with respect to the threshold current.
- Parameters:
dt (
float)pre_delay (
float)duration (
float)post_delay (
float)threshold_current (
float)threshold_percentage (
float)frequency (
float)width (
float)
- Return type:
- class bluecellulab.stimulus.stimulus.PulseTrain(dt, duration, amplitude, frequency, width)[source]¶
Generates a pulse train signal.
- Parameters:
dt (
float)duration (
float)amplitude (
float)frequency (
float)width (
float)
- property current: ndarray¶
Current values of the stimulus.
- property time: ndarray¶
Time values of the stimulus.
- class bluecellulab.stimulus.stimulus.Ramp[source]¶
- classmethod amplitude_based(dt, pre_delay, duration, post_delay, amplitude)[source]¶
Create a Ramp stimulus from given time events and amplitudes.
- Parameters:
dt (
float) – The time step of the stimulus.pre_delay (
float) – The delay before the start of the ramp.duration (
float) – The duration of the ramp.post_delay (
float) – The time to wait after the end of the ramp.amplitude (
float) – The final amplitude of the ramp.
- Return type:
- classmethod threshold_based(dt, pre_delay, duration, post_delay, threshold_current, threshold_percentage)[source]¶
Creates a Ramp stimulus with respect to the threshold current.
- Parameters:
dt (
float) – The time step of the stimulus.pre_delay (
float) – The delay before the start of the ramp.duration (
float) – The duration of the ramp.post_delay (
float) – The time to wait after the end of the ramp.threshold_current (
float) – The threshold current of the Cell.threshold_percentage (
float) – Percentage of desired threshold_current amplification.
- Return type:
- class bluecellulab.stimulus.stimulus.ShotNoise[source]¶
Factory-compatible Shot Noise Stimulus.
- classmethod amplitude_based(dt, pre_delay, duration, post_delay, rate, mean, sigma, rise_time, decay_time, seed=None)[source]¶
Creates a shot noise stimulus with a specified amplitude.
- Parameters:
dt (
float) – Time step of the stimulus.pre_delay (
float) – Delay before the noise starts.duration (
float) – Duration of the noise signal.post_delay (
float) – Delay after the noise ends.rate (
float) – Frequency of synaptic-like events.mean (
float) – Mean amplitude of the events.sigma (
float) – Standard deviation of event amplitudes.rise_time (
float) – Time constant for the event’s rise phase.decay_time (
float) – Time constant for the event’s decay phase.seed (
Optional[int]) – Random seed for reproducibility.
- Return type:
- classmethod threshold_based(dt, pre_delay, duration, post_delay, rise_time, decay_time, mean_percent, sigma_percent, threshold_current, relative_skew=0.5, seed=None)[source]¶
Creates a shot noise stimulus based on a neuron’s threshold current.
- Parameters:
dt (
float) – Time step of the stimulus.pre_delay (
float) – Delay before the noise starts.duration (
float) – Duration of the noise signal.post_delay (
float) – Delay after the noise ends.rise_time (
float) – Rise time constant of events.decay_time (
float) – Decay time constant of events.mean_percent (
float) – Mean value as a percentage of the threshold current.sigma_percent (
float) – Standard deviation as a percentage of the threshold current.threshold_current (
float) – Baseline threshold current.relative_skew (
float) – Skew factor affecting noise distribution.seed (
Optional[int]) – Random seed for reproducibility.
- Return type:
- class bluecellulab.stimulus.stimulus.ShotNoiseProcess(dt, duration, rate, mean, sigma, rise_time, decay_time, seed=None)[source]¶
Generates a shot noise signal, modeling discrete synaptic events occurring at random intervals.
- Parameters:
dt (
float)duration (
float)rate (
float)mean (
float)sigma (
float)rise_time (
float)decay_time (
float)seed (
Optional[int])
- property current: ndarray¶
Current values of the stimulus.
- property time: ndarray¶
Time values of the stimulus.
- class bluecellulab.stimulus.stimulus.Sinusoidal[source]¶
Factory-compatible Sinusoidal Stimulus.
- classmethod amplitude_based(dt, pre_delay, duration, post_delay, amplitude, frequency)[source]¶
Creates a sinusoidal stimulus with a specified amplitude.
- Parameters:
dt (
float) – Time step of the stimulus.pre_delay (
float) – Delay before the sinusoidal wave starts.duration (
float) – Duration of the sinusoidal signal.post_delay (
float) – Delay after the wave ends.amplitude (
float) – Amplitude of the sinusoidal wave.frequency (
float) – Frequency of the wave in Hz.
- Return type:
- classmethod threshold_based(dt, pre_delay, duration, post_delay, frequency, threshold_current, amplitude_percent)[source]¶
Creates a sinusoidal stimulus relative to the threshold current.
- Parameters:
dt (
float) – Time step of the stimulus.pre_delay (
float) – Delay before the sinusoidal wave starts.duration (
float) – Duration of the sinusoidal signal.post_delay (
float) – Delay after the wave ends.frequency (
float) – Frequency of the wave in Hz.threshold_current (
float) – Baseline threshold current.amplitude_percent (
float) – Amplitude as a percentage of the threshold current.
- Return type:
- class bluecellulab.stimulus.stimulus.SinusoidalWave(dt, duration, amplitude, frequency)[source]¶
Generates a sinusoidal current wave.
- Parameters:
dt (
float)duration (
float)amplitude (
float)frequency (
float)
- property current: ndarray¶
Current values of the stimulus.
- property time: ndarray¶
Time values of the stimulus.
- class bluecellulab.stimulus.stimulus.Slope(dt, duration, amplitude_start, amplitude_end)[source]¶
- Parameters:
dt (
float)duration (
float)amplitude_start (
float)amplitude_end (
float)
- property current: ndarray¶
Current values of the stimulus.
- property time: ndarray¶
Time values of the stimulus.
- class bluecellulab.stimulus.stimulus.Step[source]¶
- classmethod amplitude_based(dt, pre_delay, duration, post_delay, amplitude)[source]¶
Create a Step stimulus from given time events and amplitude.
- Parameters:
dt (
float) – The time step of the stimulus.pre_delay (
float) – The delay before the start of the step.duration (
float) – The duration of the step.post_delay (
float) – The time to wait after the end of the step.amplitude (
float) – The amplitude of the step.
- Return type:
- classmethod threshold_based(dt, pre_delay, duration, post_delay, threshold_current, threshold_percentage)[source]¶
Creates a Step stimulus with respect to the threshold current.
- Parameters:
dt (
float) – The time step of the stimulus.pre_delay (
float) – The delay before the start of the step.duration (
float) – The duration of the step.post_delay (
float) – The time to wait after the end of the step.threshold_current (
float) – The threshold current of the Cell.threshold_percentage (
float) – Percentage of desired threshold_current amplification.
- Return type:
- class bluecellulab.stimulus.stimulus.StepNoise[source]¶
Factory-compatible Step Noise Stimulus.
- classmethod amplitude_based(dt, pre_delay, duration, post_delay, step_interval, mean, sigma, seed=None)[source]¶
Creates a step noise stimulus with a specified amplitude.
- Parameters:
dt (
float) – Time step of the stimulus.pre_delay (
float) – Delay before the step noise starts.duration (
float) – Duration of the noise signal.post_delay (
float) – Delay after the step noise ends.step_interval (
float) – Interval at which noise amplitude changes.mean (
float) – Mean amplitude of step noise.sigma (
float) – Standard deviation of step noise.seed (
Optional[int]) – Random seed for reproducibility.
- Return type:
- classmethod threshold_based(dt, pre_delay, duration, post_delay, step_interval, mean_percent, sigma_percent, threshold_current, seed=None)[source]¶
Creates a step noise stimulus relative to the threshold current.
- Parameters:
dt (
float) – Time step of the stimulus.pre_delay (
float) – Delay before the step noise starts.duration (
float) – Duration of the noise signal.post_delay (
float) – Delay after the step noise ends.step_interval (
float) – Interval at which noise amplitude changes.mean_percent (
float) – Mean current as a percentage of threshold current.sigma_percent (
float) – Standard deviation as a percentage of threshold current.threshold_current (
float) – Baseline threshold current.seed (
Optional[int]) – Random seed for reproducibility.
- Return type:
- class bluecellulab.stimulus.stimulus.StepNoiseProcess(dt, duration, step_interval, mean, sigma, seed=None)[source]¶
Generates step noise: A step current with noise variations.
- Parameters:
dt (
float)duration (
float)step_interval (
float)mean (
float)sigma (
float)seed (
Optional[int])
- property current: ndarray¶
Current values of the stimulus.
- property time: ndarray¶
Time values of the stimulus.