Skip to main content

This is the python module to use SHTns, a high performance spherical harmonic transform and rotation library. It requires FFTW installed in your system.

GETTING STARTED

Basic Installation:

  • make sure FFTW is installed in your system; if not, install it using your system package manager.

  • run:

    pip install shtns

This simple installation should work and be enough for most use cases. However, in order to have the highest possible performance, FFTW should be compiled and tuned for your machine, which is not the case with pre-compiled system packages.

Disable OpenMP:

By default, OpenMP support is enabled if found on your system (it is used for the multi-threaded FFTW and shtns internals). To build without OpenMP, set the environment variable SHTNS_OPENMP=0 before running pip install shtns:

`SHTNS_OPENMP=0 pip install shtns`

Cuda GPU support:

Make sure the environment variable CUDA_PATH points to the installed cuda toolkit before running pip install shtns. This will automatically add transparent support for nvidia gpus, in "offload" mode (that means data transfers are performed by shtns).

Example code:

See https://bitbucket.org/nschaeff/shtns/src/master/examples/SHT_example.py and https://bitbucket.org/nschaeff/shtns/src/master/examples/shallow_water.py. For using the GPU from python, see https://bitbucket.org/nschaeff/shtns/src/master/examples/SHT_gpu_example.py

MORE INFO

See https://bitbucket.org/nschaeff/shtns/src/master/README.md

Metadata

Release files for shtns 3.8

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

Source distribution (sdist)

Source distribution for shtns 3.8
File Size Uploaded Provenance Actions
shtns-3.8.tar.gz 419.6 kB Without provenance Details for shtns-3.8.tar.gz

Release files / shtns-3.8.tar.gz

Download URL shtns-3.8.tar.gz
Size 419.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bb677d02f212a2b023548fd6ce6aa70c18fb7bee5941f4067cac7395fd92d971
BLAKE2b-256 checksum
How to use checksums
adea255f7fa949fe6fab808c83855799bb0c3902487ef5ba1fdf87a297b985be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for shtns 3.8

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.

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