perturbation

classes.perturbation

Classes

Name Description
Stimulus An exogenous perturbation injected into a SimulationExperiment.

Stimulus

classes.perturbation.Stimulus(**kwargs)

An exogenous perturbation injected into a SimulationExperiment.

A Stimulus describes what gets perturbed (target state variable), where (spatial pattern across nodes), when (temporal envelope), and how much (amplitude). The pattern and envelope are arbitrary symbolic expressions, so the same class covers DC steps, sinusoids, Gaussian pulses, and audio-file replay.

Attach via experiment.add_stimulus(stim); see load_acoustic_stimulus_from_audiofile for the WAV/MP3 entry point.

Methods

Name Description
get_expression Generate a sympy expression for the equation using metadata.
get_expression
classes.perturbation.Stimulus.get_expression()

Generate a sympy expression for the equation using metadata.

Returns
Name Type Description
tuple tuple (expression, parameters) — the symbolic expression of the
tuple equation (or None) and the resolved parameter substitution dict.

Functions

Name Description
class2metadata
load_acoustic_stimulus_from_audiofile

class2metadata

classes.perturbation.class2metadata(ontoclass)

load_acoustic_stimulus_from_audiofile

classes.perturbation.load_acoustic_stimulus_from_audiofile(
    file_path,
    sampling_rate=1000,
    duration='full',
)