spherical-tools


Namespherical-tools JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryUtilities for working with spherical geometry
upload_time2025-07-23 06:44:35
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
license# MIT License Copyright (c) 2025 Tom New Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords geoscience coordinates spherical cartesian geometry
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # spherical-tools

**Convert between geographic, spherical, and Cartesian coordinates.**
This is a lightweight Python library designed for geoscientists working with coordinates on the sphere.

---

## 📦 Installation

Install the latest development version:

```bash
pip install git+https://github.com/tom-new/spherical-tools.git
```

---

## 🚀 Quick Start

```python
import spherical_tools as st

# Convert from spherical (r, theta, phi) to Cartesian
# theta = azimuthal angle, phi = polar angle
x, y, z = st.sph2cart(1, 30, 60, degrees=True)

# convert from Cartesian to spherical
r, theta, phi = st.cart2sph(x, y, z, degrees=True)
```

By deafault, angles are in **radians** but input and output angles can be in degrees by setting `degrees=True`.

---

## 📚 Function Reference

- `sph2cart(r, theta, phi, degrees=False)`
- `cart2sph(x, y, z, degrees=False)`

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "spherical-tools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "geoscience, coordinates, spherical, cartesian, geometry",
    "author": null,
    "author_email": "Tom New <tomnewtonnew@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/ac/c7/6c9f51847c3bd4c447353bdd2a2a4dc5d18c53eae9e74510866bd2dd5098/spherical_tools-0.1.0.tar.gz",
    "platform": null,
    "description": "# spherical-tools\n\n**Convert between geographic, spherical, and Cartesian coordinates.**\nThis is a lightweight Python library designed for geoscientists working with coordinates on the sphere.\n\n---\n\n## \ud83d\udce6 Installation\n\nInstall the latest development version:\n\n```bash\npip install git+https://github.com/tom-new/spherical-tools.git\n```\n\n---\n\n## \ud83d\ude80 Quick Start\n\n```python\nimport spherical_tools as st\n\n# Convert from spherical (r, theta, phi) to Cartesian\n# theta = azimuthal angle, phi = polar angle\nx, y, z = st.sph2cart(1, 30, 60, degrees=True)\n\n# convert from Cartesian to spherical\nr, theta, phi = st.cart2sph(x, y, z, degrees=True)\n```\n\nBy deafault, angles are in **radians** but input and output angles can be in degrees by setting `degrees=True`.\n\n---\n\n## \ud83d\udcda Function Reference\n\n- `sph2cart(r, theta, phi, degrees=False)`\n- `cart2sph(x, y, z, degrees=False)`\n",
    "bugtrack_url": null,
    "license": "# MIT License\n        \n        Copyright (c) 2025 Tom New\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "Utilities for working with spherical geometry",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/tom-new/spherical-tools"
    },
    "split_keywords": [
        "geoscience",
        " coordinates",
        " spherical",
        " cartesian",
        " geometry"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f21c80233804b89324ec0ccace393e4854316c5c7870d9e2a5c530f35e1acc00",
                "md5": "00e5ab4475f47fd78507eb61e3333d32",
                "sha256": "a4fd41ced1ff0437174b75c0fd8a1ae3f3ab7679ab4b7ca0e98cf4b720ac2dc6"
            },
            "downloads": -1,
            "filename": "spherical_tools-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "00e5ab4475f47fd78507eb61e3333d32",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6383,
            "upload_time": "2025-07-23T06:44:33",
            "upload_time_iso_8601": "2025-07-23T06:44:33.718539Z",
            "url": "https://files.pythonhosted.org/packages/f2/1c/80233804b89324ec0ccace393e4854316c5c7870d9e2a5c530f35e1acc00/spherical_tools-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "acc76c9f51847c3bd4c447353bdd2a2a4dc5d18c53eae9e74510866bd2dd5098",
                "md5": "42ffda90c4e7ea5cfbd3e8b61f2e3660",
                "sha256": "bc2e7b3a4b1de3e4b467a45682c423d03c657c14e1535cbe50d77947c6d4cc12"
            },
            "downloads": -1,
            "filename": "spherical_tools-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "42ffda90c4e7ea5cfbd3e8b61f2e3660",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 5443,
            "upload_time": "2025-07-23T06:44:35",
            "upload_time_iso_8601": "2025-07-23T06:44:35.178013Z",
            "url": "https://files.pythonhosted.org/packages/ac/c7/6c9f51847c3bd4c447353bdd2a2a4dc5d18c53eae9e74510866bd2dd5098/spherical_tools-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-23 06:44:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tom-new",
    "github_project": "spherical-tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "spherical-tools"
}
        
Elapsed time: 1.11607s