In "Theoretical Neuroscience" by Dayan and Abbott, section 2.2 "Estimating Firing Rates", it describes how by using a linear model in combination with averaged experimental firing rates you can acquire a non-linear model graphically. This is shown in the figure below:
Given the synthetic neuron defined here, I was able to acquire both average experimental firing rates, as well as a linear model. I calculated the linear model by first acquiring the Spike-Triggered-Average using a white noise signal and then convolving it with the same white noise signal. Given that you can acquire the kernel according to:
And that you can the acquire a linear model given:
where $s(t-\tau)$ is the original white-noise stimulus.
However, when I try to plot this result, I get a graph that looks like:
Given this graph, my reasoning and my code, where could I be going wrong?