A discrete (pure) time-delay: z**-steps.

Also equivalent to (~z)**steps or 1/z**steps.

steps : integer

Number of time-steps to delay the input signal.

sys : LinearSystem

Digital filter implementing the pure delay exactly.

See also

z, PadeDelay()


A single step of the delay will be removed if using the filt method. This is done for subtle reasons of consistency with Nengo. The correct delay will appear when passed to nengo.Connection.


Simulate a Nengo network using a discrete delay of half a second for a synapse:

>>> from nengolib.synapses import DiscreteDelay
>>> import nengo
>>> with nengo.Network() as model:
>>>     stim = nengo.Node(output=lambda t: np.sin(2*np.pi*t))
>>>     p_stim = nengo.Probe(stim)
>>>     p_delay = nengo.Probe(stim, synapse=DiscreteDelay(500))
>>> with nengo.Simulator(model) as sim:
>>> import matplotlib.pyplot as plt
>>> plt.plot(sim.trange(),[p_stim], label="Stimulus")
>>> plt.plot(sim.trange(),[p_delay], label="Delayed")
>>> plt.xlabel("Time (s)")
>>> plt.legend()

(Source code)