Skip to main content

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

Metadata

Release files for pyspherex 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyspherex 1.0
File Size Uploaded Provenance Actions
pyspherex-1.0.tar.gz 6.0 kB Without provenance Details for pyspherex-1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyspherex 1.0
File Interpreter ABI Platform Actions
pyspherex-1.0-py3-none-any.whl Python 3 none any Details for pyspherex-1.0-py3-none-any.whl

Total release size: 12.6 kB

Release files / pyspherex-1.0.tar.gz

Download URL pyspherex-1.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
efcc18e8a7d5fb454973ee884caaf9a10b247492b214ebe376f86b6822d3c872
BLAKE2b-256 checksum
How to use checksums
284d79fdef43f149da8f2f6059a951f37cf1de267c340310e8d865b2f5dd5963
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / pyspherex-1.0-py3-none-any.whl

Download URL pyspherex-1.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d276a47fd8178941b44d2ba6687a251975e71cfd7b768ae1761120b56cbe20f
BLAKE2b-256 checksum
How to use checksums
6a9601fe979bf3cce65635e345e6aad34fa8fafa2e3dc05b9cb80d5c1eb82e6a
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for pyspherex 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page