{"id":38547594,"url":"https://github.com/tianluyuan/sphere","last_synced_at":"2026-01-17T07:22:57.635Z","repository":{"id":57428764,"uuid":"177882299","full_name":"tianluyuan/sphere","owner":"tianluyuan","description":"Implementation of FB8, a generalization of the Kent (1982) and Bingham-Mardia (1978) distributions on a sphere","archived":false,"fork":false,"pushed_at":"2025-12-23T19:33:06.000Z","size":21414,"stargazers_count":19,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-25T09:47:48.707Z","etag":null,"topics":["distribution","fisher-bingham","kent","sphere"],"latest_commit_sha":null,"homepage":"https://doi.org/10.1007/s00180-020-01023-w","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/tianluyuan.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-03-26T23:11:10.000Z","updated_at":"2025-12-23T19:33:09.000Z","dependencies_parsed_at":"2022-09-02T17:23:25.226Z","dependency_job_id":"54efd8be-e5b6-464b-9986-4c9463d84f85","html_url":"https://github.com/tianluyuan/sphere","commit_stats":{"total_commits":290,"total_committers":4,"mean_commits":72.5,"dds":"0.22758620689655173","last_synced_commit":"7d47def094b6044165e003b577d8ce623e00323f"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/tianluyuan/sphere","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tianluyuan%2Fsphere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tianluyuan%2Fsphere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tianluyuan%2Fsphere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tianluyuan%2Fsphere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tianluyuan","download_url":"https://codeload.github.com/tianluyuan/sphere/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tianluyuan%2Fsphere/sbom","scorecard":{"id":884295,"data":{"date":"2025-08-11","repo":{"name":"github.com/tianluyuan/sphere","commit":"56e9ceec52fde474d0a7e8e8914e5a440b419822"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/checks.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/dependabot.yml:6","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish.yml:39"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/checks.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/tianluyuan/sphere/checks.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/checks.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/tianluyuan/sphere/checks.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/checks.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/tianluyuan/sphere/checks.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependabot.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/tianluyuan/sphere/dependabot.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/tianluyuan/sphere/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/tianluyuan/sphere/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/tianluyuan/sphere/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/tianluyuan/sphere/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/tianluyuan/sphere/publish.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/checks.yml:51","Warn: pipCommand not pinned by hash: .github/workflows/checks.yml:52","Warn: pipCommand not pinned by hash: .github/workflows/checks.yml:53","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:21","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (22) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T09:27:07.817Z","repository_id":57428764,"created_at":"2025-08-24T09:27:07.817Z","updated_at":"2025-08-24T09:27:07.817Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28503693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: 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":["distribution","fisher-bingham","kent","sphere"],"created_at":"2026-01-17T07:22:57.179Z","updated_at":"2026-01-17T07:22:57.621Z","avatar_url":"https://github.com/tianluyuan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI version](https://img.shields.io/pypi/v/fb8)](https://pypi.org/project/fb8) [![Build Status](https://github.com/tianluyuan/sphere/actions/workflows/checks.yml/badge.svg)](https://github.com/tianluyuan/sphere/actions) [![Python versions](https://img.shields.io/pypi/pyversions/fb8)](https://pypi.org/project/fb8)\n\nGetting started\n=================\n`pip install fb8`\n\n```Python\nimport numpy as np\nfrom matplotlib import pyplot as plt\nfrom matplotlib import cm\nfrom mpl_toolkits.mplot3d import Axes3D\nfrom sphere.distribution import fb8\n\n\ndef grid(npts):\n    return [_.flatten() for _ in np.meshgrid(np.linspace(0, np.pi, npts), np.linspace(0,2*np.pi, npts))]\n\n\ndef plot_fb8(fb8, npts):\n    \"\"\"\n    Plot fb8 on 3D sphere\n    \"\"\"\n    xs = fb8.spherical_coordinates_to_nu(*grid(npts))\n    pdfs = fb8.pdf(xs)\n    z,x,y = xs.T #!!! Note the ordering for xs here is used consistently throughout. Follows Kent's 1982 paper.\n\n    fig = plt.figure(figsize=plt.figaspect(1.))\n    ax = fig.add_subplot(111, projection='3d')\n    ax.plot_surface(x.reshape(npts, npts),\n                    y.reshape(npts, npts),\n                    z.reshape(npts, npts),\n                    alpha=0.5,\n                    rstride=1, cstride=1,\n                    facecolors=cm.plasma(pdfs.reshape(npts, npts)/pdfs.max()))\n    ax.set_axis_off()\n    plt.tight_layout(-5)\n    plt.show()\n\n\nplot_fb8(fb8(np.pi/16,-np.pi/3,0,10,10,-1,0.5,0.3), 200)\n```\n\nBasic information\n=================\nImplements calculation of the density and fitting (using maximum likelihood estimate) of the FB8 distribution on a sphere, which is a generalization of the FB6, FB5 (Kent), and FB4 (Bingham-Mardia) distributions described below.\n\nImplements the FB6 distribution that is first introduced in Rivest ([1984](https://www.doi.org/10.1214/aos/1176346724)).\n\nImplements calculation of the density and fitting (using maximum likelihood estimate) of the Kent distribution based on Kent ([1982](https://doi.org/10.1111/j.2517-6161.1982.tb01189.x)). A unittest is performed if distribution.py is called from the command line.\n\nImplements the Bingham-Mardia distribution whose mode is a small-circle on the sphere based on Bingham, Mardia ([1978](https://doi.org/10.1093/biomet/65.2.379)).\n\nAlso calculates directional, percentile levels which can be used to indicate the N% highest-posterior-density regions in the sky.\n\n![maps](fig/example.png)\n\nAdditional references\n=================\nKent, Hussein, Jah, [_Directional distributions in tracking of space debris_](https://ieeexplore.ieee.org/abstract/document/7528139) \n\nTerdik, Jammalamadaka, Wainwright, [_Simulation and visualization of spherical distributions_](https://www.researchgate.net/profile/Gyorgy_Terdik/publication/324605982_Simulation_and_Visualization_of_Spherical_Distributions/links/5ad8edceaca272fdaf81fe04/Simulation-and-Visualization-of-Spherical-Distributions.pdf)\n\nMardia, Jupp, [_Directional statistics_](https://www.doi.org/10.1002/9780470316979)\n\nNotes\n=================\nCurrently the `scipy.special.hyp2f1` is used and may exhibit inaccuracies for large parameters. See github [issues](https://github.com/scipy/scipy/issues?utf8=%E2%9C%93\u0026q=is%3Aissue+is%3Aopen+hyp2f1).\n\nAcknowledgements\n=================\n\nThis project was originally developed for the FB5 (Kent) distribution [here](https://github.com/edfraenkel/kent_distribution).\n\n_Tianlu Yuan_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftianluyuan%2Fsphere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftianluyuan%2Fsphere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftianluyuan%2Fsphere/lists"}