Conversation
NelleV
left a comment
There was a problem hiding this comment.
Hi @dstansby
When you do work on the examples, can you make sure they follow our new standards?
In particular, concerning their documentation:
http://matplotlib.org/devdocs/devel/MEP/MEP12.html#clean-up-guidelines
|
Woops, hadn't come across those new standards before! Should be good now, |
| r = np.exp(-t / 0.05) | ||
|
|
||
| cnse1 = np.convolve(nse1, r, mode='same') * dt # colored noise 1 | ||
| cnse2 = np.convolve(nse2, r, mode='same') * dt # colored noise 2 |
There was a problem hiding this comment.
I'm not exactly sure what this "colored noise" means, but something is wrong here. If you don't limit the x-axis, you can see that past 15s, the noise is nearly zero. It works better if you use full mode and truncate the result:
cnse1 = np.convolve(nse1, r)[:len(t)] * dt # colored noise 1
cnse2 = np.convolve(nse2, r)[:len(t)] * dt # colored noise 2 |
I have removed the convolution completely from the example, since I'm not sure it adds anything. Now it still shows that the coherence peaks at 10Hz, which is the coherent bit of the two signals. |
See http://matplotlib.org/devdocs/_images/cohere_demo1.png for current image
plt.subplots!