{"id":20647493,"url":"https://github.com/jmbhughes/noise_gating","last_synced_at":"2025-10-05T09:52:14.398Z","repository":{"id":67155751,"uuid":"96129879","full_name":"jmbhughes/noise_gating","owner":"jmbhughes","description":"reducing shot noise using regional fourier transforms","archived":false,"fork":false,"pushed_at":"2024-06-15T21:07:31.000Z","size":67806,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-13T08:56:29.818Z","etag":null,"topics":["astronomical-algorithms","astronomical-images","image-processing","noise-reduction"],"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/jmbhughes.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,"publiccode":null,"codemeta":null}},"created_at":"2017-07-03T16:19:04.000Z","updated_at":"2024-06-15T21:07:34.000Z","dependencies_parsed_at":"2023-05-27T17:15:38.554Z","dependency_job_id":null,"html_url":"https://github.com/jmbhughes/noise_gating","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jmbhughes/noise_gating","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbhughes%2Fnoise_gating","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbhughes%2Fnoise_gating/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbhughes%2Fnoise_gating/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbhughes%2Fnoise_gating/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmbhughes","download_url":"https://codeload.github.com/jmbhughes/noise_gating/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbhughes%2Fnoise_gating/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278437953,"owners_count":25986760,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["astronomical-algorithms","astronomical-images","image-processing","noise-reduction"],"created_at":"2024-11-16T16:32:59.289Z","updated_at":"2025-10-05T09:52:14.371Z","avatar_url":"https://github.com/jmbhughes.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Noise gater\n\n\u003e [!warning]\n\u003e This code is no longer maintained. I highly suggest using [Craig DeForest's Cython version now](https://github.com/drzowie/image-noise-gate). \n\n## Background\nThis is a python implementation of [DeForest (2017)'s approach](https://iopscience.iop.org/article/10.3847/1538-4357/aa67f1/pdf) to reducing noise in images using regional fourier \ntransforms to remove noise from images. For the full details of how it works, please refer to the original paper in \nThe Astrophysical Journal, Volume 838, Issue 2, article id. 155, 10 pp, 2017. \n\n## Setup\nSince this was designed for astronomical usage, it only takes FITS as a file format.\nFor other uses, the code can easy be modified to read a different image format in as an array. \nIf you find need for this, please contact me.\n\nTo install the dependencies, install via `requirements.txt` with:\n`pip install -r requirements.txt`\n\n## Running\nThe program has two required parameters:\n* `__in_directory__`: directory containing FITS files to noise gate, order is determined by sorting on the filename\n* `__out_directory__`: directory to save the noise gated FITS files in\n  \nThe program has multiple optional parameters with defaults that can be viewed with `python run.py --help`:\n* `__gamma__`: this indicates how much noise should be removed, for a more rigorous definition see DeForest (2017)\n* `__beta_percentile__`: percentile used to determine the beta_approx, eqn 7 in DeForest (2017). \n* `__beta_count__`: how many image tiles are used when calculating beta_aprox, eqn 7 in DeForest (2017)\n* `__width__`: size of the image tile cubes used noise gating\n\nExample call:\n```\npython run.py IN_DIRECTORY OUT_DIRECTORY\n```\n\n## Results\nYou can see example.mp4 in this folder for the type of improvement expected. \nA frame from this movie is shown below:\n\n![See examples/example.png](examples/example.png \"example result\")\n\nThe upper left is a good image, no cleaning necessary. However, we often see images like the upper right, \ndominated by shot noise. This image is created by taking the image on the upper left and adding poisson noise with as\nignal-to-noise ratio of 2. The algorithm still performs even if it's worse, although be more careful about artifacts \nshowing up. I use DeForest's algorithm to create the cleaned image on the bottom left. This can be compared to simply \nsmoothing the image to decrease the noise as in the bottom right. \n\n![See examples/currentsheet_noisegated.png](examples/currentsheet_noisegated.png \"example result\")\nIn the above image, the left is real SUVI 131 angstroms image from at flare on 2017-09-10. \nAt right, is the noisegated result. \n\nFor more examples, see the `examples` folder. \n\n\n## Todo\nThere are many features not yet added to this code yet:\n* moving computation into C for quicker performance\n* correcting the edges of images and the time series, so they aren't blacked out\n* writing a 2D version\n* comparing results to DeForest's PDL version for correctness\n\n## Author\nJames Marcus Hughes\nhughes.jmb@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmbhughes%2Fnoise_gating","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmbhughes%2Fnoise_gating","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmbhughes%2Fnoise_gating/lists"}