{"id":22273826,"url":"https://github.com/geeksloth/signal-frequency-filtering-example","last_synced_at":"2025-06-10T12:33:10.360Z","repository":{"id":224039550,"uuid":"762234183","full_name":"geeksloth/signal-frequency-filtering-example","owner":"geeksloth","description":"A simple demonstration of signal frequency filtering using Python","archived":false,"fork":false,"pushed_at":"2024-02-23T11:41:15.000Z","size":266,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T16:52:11.290Z","etag":null,"topics":["frequency-analysis","signal-processing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geeksloth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-23T10:59:50.000Z","updated_at":"2024-11-11T14:01:03.000Z","dependencies_parsed_at":"2024-02-23T12:26:09.534Z","dependency_job_id":"cdb5d6bc-5049-4e6d-933c-c8d816ad1d00","html_url":"https://github.com/geeksloth/signal-frequency-filtering-example","commit_stats":null,"previous_names":["geeksloth/signal-frequency-filtering-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeksloth%2Fsignal-frequency-filtering-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeksloth%2Fsignal-frequency-filtering-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeksloth%2Fsignal-frequency-filtering-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeksloth%2Fsignal-frequency-filtering-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geeksloth","download_url":"https://codeload.github.com/geeksloth/signal-frequency-filtering-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeksloth%2Fsignal-frequency-filtering-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259075771,"owners_count":22801639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frequency-analysis","signal-processing"],"created_at":"2024-12-03T13:16:30.259Z","updated_at":"2025-06-10T12:33:10.330Z","avatar_url":"https://github.com/geeksloth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Signal Frequency Filtering Example\nA simple demonstration of signal frequency filtering using Python.\n\n![Figure_1.png](static/Figure_1.png)\n\n\n## Step 1. Signal Generation\n1. Generate a linear space-time starting value of the sequence from 0, to the stop sequence at 10, and there are 2000 samples. \n2. Generate a signal from the previous space-time with 2 frequencies with different amplitude.\n3. Analyze the frequencies by applying the `Fourier Analysis`. If the length of our data is in `second`, now it is in `Hz`.\n\n![code-1.png](static/code-1.png)\n\n## Step 2. Filtering Process\n4. Cutting some frequencies from the signal.\n5. Transform the result from `Frequency Domain` back to the `Spatial Domain`.\n\n![code-2.png](static/code-2.png)\n\n## Step 3. Visualization\n6. Plotting the process as a result from the begining of this readme file :)\n7. For the fast way to share, the code is in below:\n\n```python\nimport numpy as np\nfrom scipy.fftpack import rfft, irfft, fftfreq\nimport pylab as plt\n\ntime   = np.linspace(0,10,2000)\nsignal = np.cos(5*np.pi*time) + np.cos(7*np.pi*time)\n\nW = fftfreq(signal.size, d=time[1]-time[0])\nf_signal = rfft(signal)\n   \ncut_f_signal = f_signal.copy()\ncut_f_signal[(W\u003c6)] = 0\n\ncut_signal = irfft(cut_f_signal)\n\nplt.subplot(221)\nplt.plot(time,signal)\nplt.subplot(222)\nplt.plot(W,f_signal)\nplt.xlim(0,10)\nplt.subplot(223)\nplt.plot(W,cut_f_signal)\nplt.xlim(0,10)\nplt.subplot(224)\nplt.plot(time,cut_signal)\nplt.show()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeeksloth%2Fsignal-frequency-filtering-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeeksloth%2Fsignal-frequency-filtering-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeeksloth%2Fsignal-frequency-filtering-example/lists"}