def diffusion_basis(N=range(1,6),t=np.arange(100)):
'''
Note: conceptually similar to other basis functions in this file
with base=2 and offset=1
repeatly convolves exponential with itself to generate basis
Parameters
----------
Returns
-------
'''
print('THIS IS BAD')
assert 0
normalize = lambda x:x/np.sum(x)
first = np.fft(np.exp(-t))
kernels = [normalize(np.real(np.ifft(first**(2**(1+(n-1)*0.5))))) for n in N]
return np.array(kernels)
评论列表
文章目录