Source code for hetero.stimulus

from os.path import join as osjoin # an alias for convenience
from hetero.stims.maps import *
from hetero.stims.processes import *
from hetero.stims.elem_funcs import *
from hetero.utils import get_default_args


[docs] def synthesize(name, n_timesteps, dt_scaler, **stim_params): """Synthesizes timeseries from the specified process. Parameters ---------- name : str The name of the underlying process. See notes for valid names. n_timesteps : int Number of timesteps. dt_scaler : float A scaling factor to up/down scale the integrator's timestep (only relevant for `processes`.) Returns ------- ndarray Synthesized array Notes ----- All supported generative processes can be categorized into three categories: - elementary functions: simple functions of time - maps: functions of previous step (without explicit notion of physical time) - processes: (system of) ODEs with explicit notion of time The valid processes are listed below. Also see their respective documentation for potential arguments. Elementary functions - sin - sign - null Maps - henon_map - logistic_map - narma Processes - lorenz - lorenz96 - mackey_glass - multiscroll - doublescroll - rabinovich_fabrikant - rossler - kuramoto_sivashinsky """ func = eval(name) h_default = get_default_args(func)['h'] return func(n_timesteps = n_timesteps, h = h_default*dt_scaler, **stim_params)