# coding: utf-8
import numpy as np
from scipy import ndimage
from matplotlib import pyplot as plt

signal = np.zeros((1,100), dtype='float64')
signal = np.append(signal, np.ones(signal.shape, dtype=signal.dtype))
response = ndimage.filters.gaussian_filter(signal, 5.0)

plt.plot(signal)
plt.axis([0, 200, -1, 2])
plt.show()

plt.plot(response)
plt.axis([0, 200, -1, 2])
plt.show()

LoG = []
for i in xrange(1, 198):
    r = response[i-1] - 2*response[i] + response[i+1]
    LoG.append(r)
LoG = np.array(LoG)

plt.plot(LoG)
plt.show()
