{ "info": { "author": "T. Yuan", "author_email": "tyuan@icecube.wisc.edu", "bugtrack_url": null, "classifiers": [], "description": "Getting 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\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 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](https://github.com/tianluyuan/sphere/blob/master/fig/example.png?raw=true)\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\nContributors\n=================\n\nThis project was originally developed for the FB5 (Kent) distribution [here](https://github.com/edfraenkel/kent_distribution).\n\n_Tianlu Yuan_\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tianluyuan/sphere.git", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "fb8", "package_url": "https://pypi.org/project/fb8/", "platform": "", "project_url": "https://pypi.org/project/fb8/", "project_urls": { "Homepage": "https://github.com/tianluyuan/sphere.git" }, "release_url": "https://pypi.org/project/fb8/0.2.0/", "requires_dist": [ "numpy", "scipy", "matplotlib; extra == 'plotting'", "healpy; extra == 'plotting'" ], "requires_python": "", "summary": "Implementation of Kent (1982) and Bingham-Mardia (1978) distributions on a sphere", "version": "0.2.0" }, "last_serial": 5421849, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4c0849690c420988bb16471d859c32a1", "sha256": "d14063f6b9a9a8db5aff16cde8ea94d7ce15e3f9690dbcd4502dc318bb3f9d8b" }, "downloads": -1, "filename": "fb8-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "4c0849690c420988bb16471d859c32a1", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 17198, "upload_time": "2019-05-12T21:34:30", "url": "https://files.pythonhosted.org/packages/72/83/c200633d061eddaaab3e8b090daef233c5a76c563b0dd506f19414cdad47/fb8-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "292c86cd2d11acf07bf30265f4cb06e4", "sha256": "b3dd290b9a0f5caabcbb934580cebcce485afb538c7a093131bff572fd28244e" }, "downloads": -1, "filename": "fb8-0.1.0.tar.gz", "has_sig": false, "md5_digest": "292c86cd2d11acf07bf30265f4cb06e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15935, "upload_time": "2019-05-12T21:34:32", "url": "https://files.pythonhosted.org/packages/1e/2d/04c257b6357ce1a57d7d7eda28c71906ed27be2fe5bd5cd6174e275aeb16/fb8-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "d2123ec631f855f3e52d1f775ded4d5a", "sha256": "fa7407c67e958b66e7ba27fca8f669d2bfa79a4101cfe83ccd9119208f9ac8a1" }, "downloads": -1, "filename": "fb8-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "d2123ec631f855f3e52d1f775ded4d5a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 19671, "upload_time": "2019-06-19T17:31:39", "url": "https://files.pythonhosted.org/packages/57/1e/9b1fd759b5f6d828bcc168a519ecdd7a867883986c60ff5243754910dd0b/fb8-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c65aee75598a8764ddc40c7c5beb2f42", "sha256": "9f2585b410c279efab3510134cc5139908a61a5fc2955ac1a019e74395462d88" }, "downloads": -1, "filename": "fb8-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c65aee75598a8764ddc40c7c5beb2f42", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18530, "upload_time": "2019-06-19T17:31:41", "url": "https://files.pythonhosted.org/packages/55/ff/b847bc5dae2f9e24b804425043a8843907fb8b914249189f6a6d6a2cee52/fb8-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d2123ec631f855f3e52d1f775ded4d5a", "sha256": "fa7407c67e958b66e7ba27fca8f669d2bfa79a4101cfe83ccd9119208f9ac8a1" }, "downloads": -1, "filename": "fb8-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "d2123ec631f855f3e52d1f775ded4d5a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 19671, "upload_time": "2019-06-19T17:31:39", "url": "https://files.pythonhosted.org/packages/57/1e/9b1fd759b5f6d828bcc168a519ecdd7a867883986c60ff5243754910dd0b/fb8-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c65aee75598a8764ddc40c7c5beb2f42", "sha256": "9f2585b410c279efab3510134cc5139908a61a5fc2955ac1a019e74395462d88" }, "downloads": -1, "filename": "fb8-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c65aee75598a8764ddc40c7c5beb2f42", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18530, "upload_time": "2019-06-19T17:31:41", "url": "https://files.pythonhosted.org/packages/55/ff/b847bc5dae2f9e24b804425043a8843907fb8b914249189f6a6d6a2cee52/fb8-0.2.0.tar.gz" } ] }