arvoelke / nengolib

Nengo library of additional extensions
Other
29 stars 6 forks source link

Extend pade_delay_error to accept readout time #157

Open arvoelke opened 5 years ago

arvoelke commented 5 years ago

The error function is non-uniform across the window. Can be generated via the following extension (used in the NECO paper, Figure 4 via this code):

theta_times_freq = 1.0
r = 0.5
q = 6

A, B, _, D = PadeDelay(1., order=q).ss
C = readout(q, r)
tf = LinearSystem((A, B, C, D))

s = 2j * np.pi * theta_times_freq
return np.abs(np.exp(-r * s) - tf(s)))

Can also support arrays for r in readout, and document/expose that helper. And then support arrays for the r in this helper to generate a matrix shaped as (len(theta_times_freq), len(r)).