{"id":37077719,"url":"https://github.com/bkellmayer6/pybelikov","last_synced_at":"2026-01-14T09:00:57.755Z","repository":{"id":326015101,"uuid":"1103430813","full_name":"bkellmayer6/pybelikov","owner":"bkellmayer6","description":"Efficient high-precision computation of fully normalized associated Legendre functions (fnALFs) using the Belikov recurrence algorithm","archived":false,"fork":false,"pushed_at":"2025-11-25T21:12:26.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-28T09:37:35.373Z","etag":null,"topics":["fully-normalized-associated-legendre-functions","geodesy","gravity-field","legendre-functions","mathematics","numba","numpy","python","scientific-computing","spherical-harmonics"],"latest_commit_sha":null,"homepage":"","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/bkellmayer6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-24T21:32:49.000Z","updated_at":"2025-11-25T21:12:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bkellmayer6/pybelikov","commit_stats":null,"previous_names":["bkellmayer6/pybelikov"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bkellmayer6/pybelikov","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkellmayer6%2Fpybelikov","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkellmayer6%2Fpybelikov/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkellmayer6%2Fpybelikov/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkellmayer6%2Fpybelikov/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bkellmayer6","download_url":"https://codeload.github.com/bkellmayer6/pybelikov/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkellmayer6%2Fpybelikov/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fully-normalized-associated-legendre-functions","geodesy","gravity-field","legendre-functions","mathematics","numba","numpy","python","scientific-computing","spherical-harmonics"],"created_at":"2026-01-14T09:00:57.082Z","updated_at":"2026-01-14T09:00:57.743Z","avatar_url":"https://github.com/bkellmayer6.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pybelikov\n\n[![PyPI](https://img.shields.io/pypi/v/pybelikov?color=blue)](https://pypi.org/project/pybelikov/)\n[![License](https://img.shields.io/pypi/l/pybelikov)](https://github.com/bkellmayer6/pybelikov/blob/main/LICENSE)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.17716289.svg)](https://doi.org/10.5281/zenodo.17716289)\n\nA Python module for the high-precision computation of **Fully Normalized Associated Legendre Functions (fnALFs)** using the Belikov recurrence algorithm.\n\n## Why pybelikov?\n\nStandard recursive algorithms for Legendre functions often suffer from numerical instability (underflow/overflow) at high degrees ($n \u003e 2000$) and can be computationally slow.\n\n`pybelikov` implements the stable recurrence methods originally derived by Belikov, using the formulation and evaluation presented by **Lei \u0026 Li (2016)**. This implementation is optimized for modern Python environments and offers two execution modes:\n\n1. **JIT Mode (Default):** Uses `numba` to compile the recursion into machine code.\n    * **~38x faster** than standard iterative loop implementations.\n    * **~25% faster** than optimized vectorized NumPy code.\n2. **Vectorized Mode:** A pure NumPy implementation that utilizes array broadcasting.\n    * **~30x faster** than standard iterative loop implementations.\n\n*Benchmarks performed on N=2190 (EGM2008 standard).*\n\n## Installation\n\n```bash\npip install pybelikov\n```\n\n## Usage\n\n```Python\nimport numpy as np\nfrom pybelikov import compute_fnALF\n\n# Define parameters\ndegree = 2190\ncolat_rad = np.deg2rad(45.0)  # Colatitude in radians\n\n# Compute using the fastest method (JIT)\nP_nm = compute_fnALF(N=degree, theta=colat_rad, method='jit')\n\n# Access a specific value P(n=2, m=2)\nprint(f\"P_2,2 = {P_nm[2, 2]}\")\n```\n\n## References\n\nThe algorithm implemented in this package is based on the evaluation and formulation described in:\n\nLei, W., \u0026 Li, K. (2016). Evaluating Applicability of Four Recursive\nAlgorithms for Computation of the Fully Normalized Associated Legendre\nFunctions. Journal of Applied Geodesy, 10(4).\n\u003chttps://doi.org/10.1515/jag-2016-0032\u003e\n\n## Citing pybelikov\n\nIf you use `pybelikov` in your research, please credit the software.\nA `CITATION.cff` file is included in this repository for compatibility with reference managers.\n\n**Software Citation:**\n\u003e Kellmayer, B. (2025). pybelikov: High-precision computation of fully\n\u003e normalized associated Legendre functions.\n\u003e \u003chttps://github.com/bkellmayer6/pybelikov\u003e\n\n**Algorithm Citation:**\n\u003e Lei, W., \u0026 Li, K. (2016). Evaluating Applicability of Four Recursive\n\u003e Algorithms for Computation of the Fully Normalized Associated Legendre\n\u003e Functions. Journal of Applied Geodesy, 10(4).\n\n## Acknowledgements\n\nThe development of `pybelikov` originated as coursework for the Graduate\nGeodetic Science program at The Ohio State University. Special thanks to\nProf. Jun-Yi Guo, Brayden Brinks, and Yushan Zhang for their help\nthroughout the course and in the development of this code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkellmayer6%2Fpybelikov","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbkellmayer6%2Fpybelikov","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkellmayer6%2Fpybelikov/lists"}