nengolib.signal.EvalPoints¶
-
class
nengolib.signal.EvalPoints(sys, process, n_steps=10000, dt=None, **run_steps_kwargs)[source]¶ Samples the output of a LinearSystem given some input process.
This can be used to sample the evaluation points according to some filtered process. Used by
RollingWindow.Parameters: - sys :
linear_system_like Linear system representation.
- process :
nengo.Process Nengo process to simulate.
- n_steps :
integer, optional Number of steps to simulate the process. Defaults to
10000.- dt :
float, optional Process and system simulation time-step. Defaults to
process.default_dt.- **run_steps_kwargs :
dictionary, optional Additional keyword arguments for
process.run_steps.
See also
Encoders,Callable,RollingWindow,nengo.Ensemble,nengo.dists.DistributionNotes
For ideal sampling, the given
processshould be aperiodic across the interval of time specified byn_stepsanddt, and moreover the samplednum(number of evaluation points) should not exceedn_steps.Examples
>>> from nengolib.signal import EvalPoints
Sampling from the state-space of an alpha synapse given band-limited white noise:
>>> from nengolib import Alpha >>> from nengo.processes import WhiteSignal >>> eval_points = EvalPoints(Alpha(.5).X, WhiteSignal(10, high=20))
>>> import matplotlib.pyplot as plt >>> from seaborn import jointplot >>> jointplot(*eval_points.sample(1000, 2).T, kind='kde') >>> plt.show()
Methods
sample(num[, d, rng])Samples npoints inddimensions.- sys :