Skip to main content

Python tool to perform spherical harmonics expansion.

Project description

PySphereX

zenodo badge

PySphereX is a Python tool to perform spherical harmonics expansion of data given on a uniformly spaced grid on a sphere. Its features include:

  • Expansion class that defines an arbitrary complex spherical harmonics expansion
  • Convenience constructor Expansion.from_data that initializes Expansion object from gridded data on a sphere up to a maximum degree
  • Evaluation of Expansion object at arbitrary coordinates
  • Angular power spectrum
  • Algebraic operations: Addition, subtraction and overlap between two Expansion objects

Getting Started

Make sure that Python 3.7 or newer is available and install pyspherex using pip,

pip install pyspherex

As a "getting started guide" we provide an example (in folder examples/) that shows the basic functionalities of this package. For further information see the doc-strings and the unit tests.

Contributing

Report an issue

We use the issue-tracking management system associated with the project provided by Github. If you want to report a bug or request a feature, open an issue at https://github.com/marstaa/PySphereX/issues. You may also comment on existing issues.

Development environment

We strongly recommend to use Python virtual environments.

To setup the development environment, use the following commands:

git clone git@github.com:marstaa/PySphereX.git
cd PySphereX
python -m venv venv
source ./venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -e .

Workflow

The project's development workflow is based on the issue-tracking system provided by Github, as well as peer-reviewed pull requests. This ensures high-quality standards.

Issues are solved by creating branches and opening pull requests. Only the assignee of the related issue and pull request can push commits on the branch. Once all the changes have been pushed, the pull request can be marked as ready for review and is assigned to a reviewer. They can push new changes to the branch, or request changes to the original author by re-assigning the pull request to them. When the pull request is accepted, the branch is merged onto main, deleted, and the associated issue is closed.

Pylint and pytest

We enforce PEP 8 (Style Guide for Python Code) with Pylint syntax checking, and testing of the code via unit and integration tests with the pytest framework. Both are implemented in the continuous integration system. Only if all tests pass successfully a pull request can be merged.

You can run them locally

pylint */**.py
pytest

How to cite

If you intend to use this package in your own research please be sure to cite it. For BibTex we suggest:

@misc{pyspherex,
    author = {Martin Staab},
    title = {PySphereX},
    howpublished = {\url{http://github.com/marstaa/PySphereX}},
    year = {2021},
    DOI={<insert DOI from Zenodo>}
}

Acknowledgements

Many thanks to Ulrike Proske (prosku) for providing the example script.

Contact

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyspherex-1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

pyspherex-1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file pyspherex-1.0.tar.gz.

File metadata

  • Download URL: pyspherex-1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for pyspherex-1.0.tar.gz
Algorithm Hash digest
SHA256 efcc18e8a7d5fb454973ee884caaf9a10b247492b214ebe376f86b6822d3c872
MD5 48153d4d2619ed940a75cd90f6c77de5
BLAKE2b-256 284d79fdef43f149da8f2f6059a951f37cf1de267c340310e8d865b2f5dd5963

See more details on using hashes here.

File details

Details for the file pyspherex-1.0-py3-none-any.whl.

File metadata

  • Download URL: pyspherex-1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.5.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for pyspherex-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d276a47fd8178941b44d2ba6687a251975e71cfd7b768ae1761120b56cbe20f
MD5 cc2b44c98557f23f6877e1c1a62c9c2d
BLAKE2b-256 6a9601fe979bf3cce65635e345e6aad34fa8fafa2e3dc05b9cb80d5c1eb82e6a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page