tag:blogger.com,1999:blog-2783842479260003750.post3842187809446245591..comments2018-04-28T06:29:51.854-07:00Comments on Python for Signal Processing: Anonymoushttp://www.blogger.com/profile/11211805900015667837noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-2783842479260003750.post-61963731195586503532016-06-30T21:59:06.786-07:002016-06-30T21:59:06.786-07:00The statement of the sampling theorem can't be...The statement of the sampling theorem can't be right, can it? That is the typical incorrect statement found in books and tutorials that simple quote a previous book or tutorial. To sample a signal of B Hz at a 1/(2B) rate will produce a constant and you can't tell it from DC. It should be sampled at > 1/(2B). And that can take infinite time with the wrong choice of how much greater (which you cover in part 2).<br /><br />Nice work though. iPython Notebook is the dog's bow wow.C. Towne Springerhttps://www.blogger.com/profile/12304997327593238920noreply@blogger.comtag:blogger.com,1999:blog-2783842479260003750.post-75782053018351291262016-04-26T07:53:51.032-07:002016-04-26T07:53:51.032-07:00I'm glad you narrowed in on the key question, ...I'm glad you narrowed in on the key question, which is what this post was intended to motivate. I suggest you look at the other sampling theorem IPython notebooks on my corresponding github site. It takes a number of other concepts to completely answer your question. More that can be fit into this space. Anonymoushttps://www.blogger.com/profile/11211805900015667837noreply@blogger.comtag:blogger.com,1999:blog-2783842479260003750.post-69991399622745513372016-04-26T07:37:59.273-07:002016-04-26T07:37:59.273-07:00This has since been deprecated. Now you do `%pylab...This has since been deprecated. Now you do `%pylab inline` in the Jupyter/IPython notebook.Anonymoushttps://www.blogger.com/profile/11211805900015667837noreply@blogger.comtag:blogger.com,1999:blog-2783842479260003750.post-73826377958515937492016-04-25T13:19:05.056-07:002016-04-25T13:19:05.056-07:00Hi Jose, Thanks for this awesome demonstration! Af...Hi Jose, Thanks for this awesome demonstration! After I have played with the python code, there is still one problem confusing me. In the first example, the signal has one frequency, 1hz. So according to the sampling theory, if the sampling frequency is >2 hz, the original signal could be fully constructed. However, when I set the fs=2.1 Hz, the error of the constructed signal is 20% compared with the true sinusoidal signal. Could you please explain why?Anonymoushttps://www.blogger.com/profile/00514569153998314315noreply@blogger.comtag:blogger.com,1999:blog-2783842479260003750.post-18037212154569500622016-04-25T13:18:21.976-07:002016-04-25T13:18:21.976-07:00Hi Jose, Thanks for this awesome demonstration! Af...Hi Jose, Thanks for this awesome demonstration! After I have played with the python code, there is still one problem confusing me. In the first example, the signal has one frequency, 1hz. So according to the sampling theory, if the sampling frequency is >2 hz, the original signal could be fully constructed. However, when I set the fs=2.1 Hz, the error of the constructed signal is 20% compared with the true sinusoidal signal. Could you please explain why?Anonymoushttps://www.blogger.com/profile/00514569153998314315noreply@blogger.comtag:blogger.com,1999:blog-2783842479260003750.post-13365843889653560592016-04-25T12:35:17.640-07:002016-04-25T12:35:17.640-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/00514569153998314315noreply@blogger.comtag:blogger.com,1999:blog-2783842479260003750.post-82992843191937851812013-03-25T11:11:49.903-07:002013-03-25T11:11:49.903-07:00Hi, if you are using the IPython notebook, then st...Hi, if you are using the IPython notebook, then starting it with the --pylab flag should include everything you need. Otherwise,<br /><br /> from __future__ import division<br /> from matplotlib.pyplot import *<br /><br />should be basically everything you need. Let me know how it goes :-)<br />Anonymoushttps://www.blogger.com/profile/11211805900015667837noreply@blogger.comtag:blogger.com,1999:blog-2783842479260003750.post-16586549446504525102013-03-25T09:24:30.200-07:002013-03-25T09:24:30.200-07:00Trying to run your scripts, I'm having to hunt...Trying to run your scripts, I'm having to hunt down the packages they depend on. Could you include in the import statements? It would help a lot. Anonymoushttps://www.blogger.com/profile/08275165502522104558noreply@blogger.com