pyshtools


Namepyshtools JSON
Version 4.12.1 PyPI version JSON
download
home_pagehttps://shtools.github.io/SHTOOLS/
SummarySHTOOLS - Spherical Harmonic Tools
upload_time2024-03-18 13:25:35
maintainer
docs_urlNone
author
requires_python>=3.9
licenseBSD-3-Clause
keywords spherical harmonics spectral estimation slepian functions legendre functions gravity field magnetic field
VCS
bugtrack_url
requirements meson-python setuptools-scm numpy scipy matplotlib astropy xarray requests pooch tqdm cartopy pygmt ducc0 palettable jupyter flake8
Travis-CI
coveralls test coverage No coveralls.
            <p align="center">
    <img alt="SHTOOLS LOGO" src="misc/logo.png" width="100%">
    <a href="https://shtools.github.io/SHTOOLS/"><img alt="Documentation" src="https://img.shields.io/badge/documentation-shtools.github.io%2FSHTOOLS%2F-yellow.svg"></a>
    <a href="https://doi.org/10.5281/zenodo.592762"><img alt="DOI" src="https://zenodo.org/badge/doi/10.5281/zenodo.592762.svg"></a>
    <a href="https://doi.org/10.1029/2018GC007529"><img alt="Paper" src="https://img.shields.io/badge/paper-10.1029/2018GC007529-orange.svg"></a>
    <a href="https://mybinder.org/v2/gh/SHTOOLS/SHTOOLS/master?filepath=examples%2Fnotebooks%2F"><img alt="Binder" src="https://mybinder.org/badge_logo.svg"></a>
    <a href="https://matrix.to/#/%23pyshtools:matrix.org"><img alt="Chat on matrix" src="https://img.shields.io/badge/chat-on_[matrix]-4bb596.svg"></a>
    <a href="https://app.gitter.im/#/room/#pyshtools:matrix.org"><img alt="Chat at gitter" src="https://badges.gitter.im/SHTOOLS/SHTOOLS.svg"></a>
    <img alt="License" src="https://img.shields.io/badge/License-BSD_3--Clause-brightgreen.svg">
    <a href="https://fosstodon.org/@shtools"><img alt="Mastodon Follow" src="https://img.shields.io/mastodon/follow/108112567255227248?domain=https%3A%2F%2Ffosstodon.org&style=social"></a>
</p>

SHTOOLS/pyshtools is a Fortran-95/Python library that can be used for spherical harmonic transforms, multitaper spectral analyses, expansions of gridded data into Slepian basis functions, standard operations on global gravitational and magnetic field data.

### TABLE OF CONTENTS
<!-- toc -->

- [FEATURES](#features)
- [HOW TO USE](#how-to-use)
- [INSTALLATION](#installation)
  - [pyshtools (for Python)](#pyshtools-for-python)
    - [Install using `conda`](#install-using-conda)
    - [Install using `pip`](#install-using-pip)
    - [For Developers](#for-developers)
  - [SHTOOLS (for Fortran 95)](#shtools-for-fortran-95)
    - [Install using the `brew` package manager (MacOS, Linux, Windows)](#install-using-the-brew-package-manager-macos-linux-windows)
    - [Install using the `macports` package manager (MacOS)](#install-using-the-macports-package-manager-macos)
    - [Install from source](#install-from-source)
- [CONTRIBUTING](#contributing)
- [MAINTAINERS AND CONTRIBUTORS](#maintainers-and-contributors)
- [LICENSE](#license)
- [REFERENCES](#references)

<!-- tocstop -->

### FEATURES

* Supports all standard normalizations and phase conventions of the spherical harmonic functions.

* Effortless conversion between real and complex harmonics, and between different normalization and phase conventions.

* Use of both regularly sampled geographic grids and grids appropriate for Gauss-Legendre quadrature.

* Spherical harmonic transforms proven to be accurate up to about degree 2800 for the native Fortran 95 backend and beyond using the [DUCC0](https://gitlab.mpcdf.mpg.de/mtr/ducc) backend.

* Perform localized multitaper spectral analyses, or expand gridded data in terms of localized Slepian basis functions.

* Support for standard data and file formats, including *xarray* and *netcdf*.

* Import research-grade gravity, topography, and magnetic field datasets with a single command.

* Creation of publication quality maps using [Cartopy](https://scitools.org.uk/cartopy) and [PyGMT](https://scitools.org.uk/cartopy/docs/latest).

* Support multithreaded programming using the [OpenMP](https://www.openmp.org) API.

### HOW TO USE

A variety of Python tutorials and guides are available to explain the main library features. To get started, click on the following Python tutorials and run them interactively in Binder:

* [Spherical harmonic coefficients and grids](https://nbviewer.jupyter.org/github/SHTOOLS/SHTOOLS/blob/master/examples/notebooks/grids-and-coefficients.ipynb)
* [Localization windows and spectral analysis](https://nbviewer.jupyter.org/github/SHTOOLS/SHTOOLS/blob/master/examples/notebooks/localized-spectral-analysis.ipynb)
* [Gravity and magnetic fields](https://nbviewer.jupyter.org/github/SHTOOLS/SHTOOLS/blob/master/examples/notebooks/gravity-and-magnetic-fields.ipynb)
* [Plotting maps](https://nbviewer.jupyter.org/github/SHTOOLS/SHTOOLS/blob/master/examples/notebooks/plotting-maps.ipynb)

### INSTALLATION

SHTOOLS can be invoked in any Fortran 95 or Python program. The core software is written in Fortran 95, and Python wrappers and dedicated classes allow simple access to the fortran-compiled routines. To install it, run these commands below:

#### pyshtools (for Python)

##### Install using `conda`:
```bash
conda install -c conda-forge pyshtools
conda update -c conda-forge pyshtools  # to upgrade a pre-existing installation
```

##### Install using `pip`:
```bash
pip install pyshtools
pip install --upgrade pyshtools  # to upgrade a pre-existing installation
pip install pyshtools --no-binary pyshtools  # build from source
pip install git+https://github.com/SHTOOLS/SHTOOLS@develop  # install the develop branch from source
```

##### For developers:
Install the system level build requirements:
```bash
sudo apt-get install build-essential cmake gfortran  # Debian, Ubuntu and derivatives
sudo dnf group install "C Development Tools and Libraries" "Development Tools"  # Fedora, Centos, RHEL and derivatives
sudo dnf install cmake gcc-fortran  # Fedora, Centos, RHEL and derivatives
xcode-select --install  # macOS
```

Then clone the shtools repo, install the other dependencies, and install manually in a conda environment:
```bash
git clone https://github.com/SHTOOLS/SHTOOLS.git
cd shtools
conda create -n your_env_name python=3.xx  # create a new conda environment, if desired
conda env update -n your_env_name -f environment.yml
conda activate your_env_name  # activate the new conda environment
pip install --no-build-isolation -e .  # install into the shtools folder and link to the active python environment
```

#### SHTOOLS (for Fortran 95)

##### Install using the [brew](http://brew.sh/) package manager (MacOS, Linux, Windows):
```bash
brew install shtools
```

##### Install using the [macports](https://www.macports.org/) package manager (MacOS):
```bash
sudo port install shtools
```

##### Install from source:
Clone or download the this repo, and then execute one (or both) of the following commands in the `shtools` directory:
```bash
make fortran
make fortran-mp  # for OpenMP Fortran routines
```

Further installation instructions and options can be found in the [web documentation](https://shtools.github.io/SHTOOLS/).

### CONTRIBUTING

We work on the `develop` branch and only push releases to `master`. Please base all pull requests on `develop`.

### CONTRIBUTORS

For the full list of contributors, see the [AUTHORS](./AUTHORS.md) file.

### LICENSE
This project uses the BSD 3-Clause license, as found in the [LICENSE](./LICENSE.txt) file.

### REFERENCES
- Mark A. Wieczorek and Matthias Meschede (2018). SHTools --- Tools for working with spherical harmonics, *Geochemistry, Geophysics, Geosystems*, 19, 2574-2592, doi:[10.1029/2018GC007529](https://doi.org/10.1029/2018GC007529).
- Mark Wieczorek, *et al*. (2019). SHTOOLS/SHTOOLS. Zenodo, doi:[10.5281/zenodo.3457861](https://doi.org/10.5281/zenodo.3457861)

            

Raw data

            {
    "_id": null,
    "home_page": "https://shtools.github.io/SHTOOLS/",
    "name": "pyshtools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "Spherical Harmonics Spectral Estimation Slepian Functions Legendre Functions Gravity Field Magnetic Field",
    "author": "",
    "author_email": "The SHTOOLS developers <mark.wieczorek@ipgp.fr>",
    "download_url": "https://files.pythonhosted.org/packages/86/d6/3d6afddf1c0c9701a510e3c85a8ffbf701683fab851f3d81abf8763602eb/pyshtools-4.12.1.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n    <img alt=\"SHTOOLS LOGO\" src=\"misc/logo.png\" width=\"100%\">\n    <a href=\"https://shtools.github.io/SHTOOLS/\"><img alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-shtools.github.io%2FSHTOOLS%2F-yellow.svg\"></a>\n    <a href=\"https://doi.org/10.5281/zenodo.592762\"><img alt=\"DOI\" src=\"https://zenodo.org/badge/doi/10.5281/zenodo.592762.svg\"></a>\n    <a href=\"https://doi.org/10.1029/2018GC007529\"><img alt=\"Paper\" src=\"https://img.shields.io/badge/paper-10.1029/2018GC007529-orange.svg\"></a>\n    <a href=\"https://mybinder.org/v2/gh/SHTOOLS/SHTOOLS/master?filepath=examples%2Fnotebooks%2F\"><img alt=\"Binder\" src=\"https://mybinder.org/badge_logo.svg\"></a>\n    <a href=\"https://matrix.to/#/%23pyshtools:matrix.org\"><img alt=\"Chat on matrix\" src=\"https://img.shields.io/badge/chat-on_[matrix]-4bb596.svg\"></a>\n    <a href=\"https://app.gitter.im/#/room/#pyshtools:matrix.org\"><img alt=\"Chat at gitter\" src=\"https://badges.gitter.im/SHTOOLS/SHTOOLS.svg\"></a>\n    <img alt=\"License\" src=\"https://img.shields.io/badge/License-BSD_3--Clause-brightgreen.svg\">\n    <a href=\"https://fosstodon.org/@shtools\"><img alt=\"Mastodon Follow\" src=\"https://img.shields.io/mastodon/follow/108112567255227248?domain=https%3A%2F%2Ffosstodon.org&style=social\"></a>\n</p>\n\nSHTOOLS/pyshtools is a Fortran-95/Python library that can be used for spherical harmonic transforms, multitaper spectral analyses, expansions of gridded data into Slepian basis functions, standard operations on global gravitational and magnetic field data.\n\n### TABLE OF CONTENTS\n<!-- toc -->\n\n- [FEATURES](#features)\n- [HOW TO USE](#how-to-use)\n- [INSTALLATION](#installation)\n  - [pyshtools (for Python)](#pyshtools-for-python)\n    - [Install using `conda`](#install-using-conda)\n    - [Install using `pip`](#install-using-pip)\n    - [For Developers](#for-developers)\n  - [SHTOOLS (for Fortran 95)](#shtools-for-fortran-95)\n    - [Install using the `brew` package manager (MacOS, Linux, Windows)](#install-using-the-brew-package-manager-macos-linux-windows)\n    - [Install using the `macports` package manager (MacOS)](#install-using-the-macports-package-manager-macos)\n    - [Install from source](#install-from-source)\n- [CONTRIBUTING](#contributing)\n- [MAINTAINERS AND CONTRIBUTORS](#maintainers-and-contributors)\n- [LICENSE](#license)\n- [REFERENCES](#references)\n\n<!-- tocstop -->\n\n### FEATURES\n\n* Supports all standard normalizations and phase conventions of the spherical harmonic functions.\n\n* Effortless conversion between real and complex harmonics, and between different normalization and phase conventions.\n\n* Use of both regularly sampled geographic grids and grids appropriate for Gauss-Legendre quadrature.\n\n* Spherical harmonic transforms proven to be accurate up to about degree 2800 for the native Fortran 95 backend and beyond using the [DUCC0](https://gitlab.mpcdf.mpg.de/mtr/ducc) backend.\n\n* Perform localized multitaper spectral analyses, or expand gridded data in terms of localized Slepian basis functions.\n\n* Support for standard data and file formats, including *xarray* and *netcdf*.\n\n* Import research-grade gravity, topography, and magnetic field datasets with a single command.\n\n* Creation of publication quality maps using [Cartopy](https://scitools.org.uk/cartopy) and [PyGMT](https://scitools.org.uk/cartopy/docs/latest).\n\n* Support multithreaded programming using the [OpenMP](https://www.openmp.org) API.\n\n### HOW TO USE\n\nA variety of Python tutorials and guides are available to explain the main library features. To get started, click on the following Python tutorials and run them interactively in Binder:\n\n* [Spherical harmonic coefficients and grids](https://nbviewer.jupyter.org/github/SHTOOLS/SHTOOLS/blob/master/examples/notebooks/grids-and-coefficients.ipynb)\n* [Localization windows and spectral analysis](https://nbviewer.jupyter.org/github/SHTOOLS/SHTOOLS/blob/master/examples/notebooks/localized-spectral-analysis.ipynb)\n* [Gravity and magnetic fields](https://nbviewer.jupyter.org/github/SHTOOLS/SHTOOLS/blob/master/examples/notebooks/gravity-and-magnetic-fields.ipynb)\n* [Plotting maps](https://nbviewer.jupyter.org/github/SHTOOLS/SHTOOLS/blob/master/examples/notebooks/plotting-maps.ipynb)\n\n### INSTALLATION\n\nSHTOOLS can be invoked in any Fortran 95 or Python program. The core software is written in Fortran 95, and Python wrappers and dedicated classes allow simple access to the fortran-compiled routines. To install it, run these commands below:\n\n#### pyshtools (for Python)\n\n##### Install using `conda`:\n```bash\nconda install -c conda-forge pyshtools\nconda update -c conda-forge pyshtools  # to upgrade a pre-existing installation\n```\n\n##### Install using `pip`:\n```bash\npip install pyshtools\npip install --upgrade pyshtools  # to upgrade a pre-existing installation\npip install pyshtools --no-binary pyshtools  # build from source\npip install git+https://github.com/SHTOOLS/SHTOOLS@develop  # install the develop branch from source\n```\n\n##### For developers:\nInstall the system level build requirements:\n```bash\nsudo apt-get install build-essential cmake gfortran  # Debian, Ubuntu and derivatives\nsudo dnf group install \"C Development Tools and Libraries\" \"Development Tools\"  # Fedora, Centos, RHEL and derivatives\nsudo dnf install cmake gcc-fortran  # Fedora, Centos, RHEL and derivatives\nxcode-select --install  # macOS\n```\n\nThen clone the shtools repo, install the other dependencies, and install manually in a conda environment:\n```bash\ngit clone https://github.com/SHTOOLS/SHTOOLS.git\ncd shtools\nconda create -n your_env_name python=3.xx  # create a new conda environment, if desired\nconda env update -n your_env_name -f environment.yml\nconda activate your_env_name  # activate the new conda environment\npip install --no-build-isolation -e .  # install into the shtools folder and link to the active python environment\n```\n\n#### SHTOOLS (for Fortran 95)\n\n##### Install using the [brew](http://brew.sh/) package manager (MacOS, Linux, Windows):\n```bash\nbrew install shtools\n```\n\n##### Install using the [macports](https://www.macports.org/) package manager (MacOS):\n```bash\nsudo port install shtools\n```\n\n##### Install from source:\nClone or download the this repo, and then execute one (or both) of the following commands in the `shtools` directory:\n```bash\nmake fortran\nmake fortran-mp  # for OpenMP Fortran routines\n```\n\nFurther installation instructions and options can be found in the [web documentation](https://shtools.github.io/SHTOOLS/).\n\n### CONTRIBUTING\n\nWe work on the `develop` branch and only push releases to `master`. Please base all pull requests on `develop`.\n\n### CONTRIBUTORS\n\nFor the full list of contributors, see the [AUTHORS](./AUTHORS.md) file.\n\n### LICENSE\nThis project uses the BSD 3-Clause license, as found in the [LICENSE](./LICENSE.txt) file.\n\n### REFERENCES\n- Mark A. Wieczorek and Matthias Meschede (2018). SHTools --- Tools for working with spherical harmonics, *Geochemistry, Geophysics, Geosystems*, 19, 2574-2592, doi:[10.1029/2018GC007529](https://doi.org/10.1029/2018GC007529).\n- Mark Wieczorek, *et al*. (2019). SHTOOLS/SHTOOLS. Zenodo, doi:[10.5281/zenodo.3457861](https://doi.org/10.5281/zenodo.3457861)\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "SHTOOLS - Spherical Harmonic Tools",
    "version": "4.12.1",
    "project_urls": {
        "Download": "https://github.com/SHTOOLS/SHTOOLS/zipball/master",
        "Homepage": "https://shtools.github.io/SHTOOLS/"
    },
    "split_keywords": [
        "spherical",
        "harmonics",
        "spectral",
        "estimation",
        "slepian",
        "functions",
        "legendre",
        "functions",
        "gravity",
        "field",
        "magnetic",
        "field"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "86d63d6afddf1c0c9701a510e3c85a8ffbf701683fab851f3d81abf8763602eb",
                "md5": "bef2c480092b75994759033f561cf033",
                "sha256": "3c7f063cf13354a85fb5a03c0f96abdfa9f2320100a13d5a42087e81473abde0"
            },
            "downloads": -1,
            "filename": "pyshtools-4.12.1.tar.gz",
            "has_sig": false,
            "md5_digest": "bef2c480092b75994759033f561cf033",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 41552791,
            "upload_time": "2024-03-18T13:25:35",
            "upload_time_iso_8601": "2024-03-18T13:25:35.079115Z",
            "url": "https://files.pythonhosted.org/packages/86/d6/3d6afddf1c0c9701a510e3c85a8ffbf701683fab851f3d81abf8763602eb/pyshtools-4.12.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-18 13:25:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SHTOOLS",
    "github_project": "SHTOOLS",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "meson-python",
            "specs": [
                [
                    ">=",
                    "0.14"
                ]
            ]
        },
        {
            "name": "setuptools-scm",
            "specs": [
                [
                    ">=",
                    "8"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "scipy",
            "specs": [
                [
                    ">=",
                    "0.14.0"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    ">=",
                    "3.3"
                ]
            ]
        },
        {
            "name": "astropy",
            "specs": [
                [
                    ">=",
                    "4.0"
                ]
            ]
        },
        {
            "name": "xarray",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "pooch",
            "specs": [
                [
                    ">=",
                    "1.1"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": []
        },
        {
            "name": "cartopy",
            "specs": [
                [
                    ">=",
                    "0.18.0"
                ]
            ]
        },
        {
            "name": "pygmt",
            "specs": [
                [
                    ">=",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "ducc0",
            "specs": [
                [
                    ">=",
                    "0.15"
                ]
            ]
        },
        {
            "name": "palettable",
            "specs": [
                [
                    ">=",
                    "3.3"
                ]
            ]
        },
        {
            "name": "jupyter",
            "specs": []
        },
        {
            "name": "flake8",
            "specs": []
        }
    ],
    "lcname": "pyshtools"
}
        
Elapsed time: 0.21907s