{"id":32399228,"url":"https://github.com/espdev/sgolay2","last_synced_at":"2025-10-25T08:18:49.499Z","repository":{"id":52438496,"uuid":"174886140","full_name":"espdev/sgolay2","owner":"espdev","description":"Two-dimensional Savitzky-Golay filter","archived":false,"fork":false,"pushed_at":"2021-04-29T06:21:47.000Z","size":10,"stargazers_count":31,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-11T09:12:42.963Z","etag":null,"topics":["savgol","savitzky-golay","sgolay"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/espdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-10T21:58:20.000Z","updated_at":"2025-08-13T13:05:46.000Z","dependencies_parsed_at":"2022-09-06T06:11:33.592Z","dependency_job_id":null,"html_url":"https://github.com/espdev/sgolay2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/espdev/sgolay2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/espdev%2Fsgolay2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/espdev%2Fsgolay2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/espdev%2Fsgolay2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/espdev%2Fsgolay2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/espdev","download_url":"https://codeload.github.com/espdev/sgolay2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/espdev%2Fsgolay2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280924526,"owners_count":26414482,"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-25T02:00:06.499Z","response_time":81,"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":["savgol","savitzky-golay","sgolay"],"created_at":"2025-10-25T08:18:48.418Z","updated_at":"2025-10-25T08:18:49.487Z","avatar_url":"https://github.com/espdev.png","language":"Python","readme":"# Two-dimensional Savitzky-Golay filter\n\nA Savitzky–Golay filter is a digital filter that can be applied to a set of digital data points for the purpose of smoothing the data, that is, to increase the precision of the data without distorting the signal tendency. ([wikipedia](https://en.wikipedia.org/wiki/Savitzky–Golay_filter))\n\nThis code implements two-dimensional Savitzky-Golay filter that can be used for smoothing surfaces or images [1, 2].\n\n## The example of usage\n\n```python\nimport numpy as np\n\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\n\nimport sgolay2\n\nnp.random.seed(12345)\n\nx, y = np.mgrid[-5:6:.5, -5:6:.5]\nz = y * np.sin(x) + x * np.cos(y)\nzn = z + np.random.randn(*x.shape) * 2.\n\nzs = sgolay2.SGolayFilter2(window_size=9, poly_order=3)(zn)\n\nfig = plt.figure()\nax = fig.add_subplot(111, projection='3d')\n\nax.plot_wireframe(x, y, zn, linewidths=0.5, color='r')\nax.scatter(x, y, zn, s=5, c='r')\n\nax.plot_surface(x, y, zs, linewidth=0)\nax.plot_surface(x, y, z, color='y', linewidth=0, alpha=0.4)\n\nplt.show()\n```\n\n\u003cimg width=\"592\" alt=\"sgolay2_surface\" src=\"https://user-images.githubusercontent.com/1299189/54092147-bc511b00-4399-11e9-9be2-c44ce697161e.png\"\u003e\n\n\n## References\n\n1. Ratzlaff, Kenneth L.; Johnson, Jean T. (1989). \"Computation of two-dimensional polynomial least-squares convolution smoothing integers\". Anal. Chem. 61 (11): 1303–5. doi:10.1021/ac00186a026.\n2. Krumm, John. \"Savitzky–Golay filters for 2D Images\". Microsoft Research, Redmond.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fespdev%2Fsgolay2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fespdev%2Fsgolay2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fespdev%2Fsgolay2/lists"}