Skip to main content

Python wrapper for CHarm, a C library to work with spherical harmonics up to almost arbitrarily high degrees

Project description

CHarm is a C library to work with spherical harmonics up to almost arbitrarily high degrees. The library is accompanied by a Python wrapper called PyHarm.

Features

  • Supports real-valued fully-normalized surface and solid spherical harmonics (the geodetic norm).

  • Performs FFT-based surface spherical harmonic analysis and solid spherical harmonic synthesis with minimized memory requirements.

  • Stable up to high degrees and orders (tens of thousands and beyond).

  • Available in single, double and quadruple precision.

  • Supports point and mean data values (both analysis and synthesis).

  • Supports synthesis at grids and at scattered points/cells. Grid-wise computations are done by FFT whenever possible. If FFT cannot be applied, the less efficient Chebyshev recurrences are used along the latitude parallels instead.

  • Computes the full first- and second-order gradients at evaluation points (e.g., the gravitational vector and the gravitational tensor).

  • Supports the Gauss–Legendre and Driscoll–Healy quadratures.

  • Integrates solid spherical harmonic expansions (e.g., of the gravitational potential) on band-limited irregular surfaces (e.g., on the Earth’s surface). [1]

  • Computes Fourier coefficients of fully-normalized associated Legendre functions of the first kind up to ultra-high harmonic degrees.

  • Supports SIMD parallelization on the level of a single CPU core (AVX, AVX2, AVX-512 and NEON).

  • Supports OpenMP parallelization for shared-memory architectures.

  • Supports MPI parallelization for shared- and distributed-memory architectures.

  • Performs discrete FFT by FFTW.

  • Ships with a Python wrapper to enable high-level programming while retaining the efficiency of the C language. The wrapper, called PyHarm, wraps CHarm using ctypes and is fully integrated with numpy.

Installation

  • PyHarm (Python wrapper): On Linux (x86_64), macOS (x86_64, ARM64) and Windows (x86_64), install PyHarm using pip:

    pip install pyharm

    This will install PyHarm together will all the dependencies. These include a pre-compiled CHarm library, which is internally called by PyHarm, some other C libraries (FFTW and OpenMP library) and the Python package NumPy.

  • CHarm (C library): If you are interested in the C API, you have to build CHarm from source. This step is not required if you plan to use the Python interface only.

Further installation details at https://www.charmlib.org/build/html/install.html.

Source code

GitHub: https://github.com/blazej-bucha/charm

Documentation

The documentation of the latest version from the master branch is available at https://www.charmlib.org.

A pre-compiled HTML documentation is also available in docs/build/html. Alternatively, it can be built by executing make html after the configure call (requires --enable-python, --enable-mpi, doxygen and Python modules sphinx, sphinx_book_theme and breathe). Other formats of the documentation, for instance, a PDF file, can be built with cd docs && make latexpdf, etc. To list all available formats, execute cd docs && make help.

Contact

Should you have any comments, questions, bug report or criticism, please feel free to contact the author, Blažej Bucha, at blazej.bucha@stuba.sk. Further products developed by the author can be found at https://www.blazejbucha.com.

Pronunciation

We prefer to pronounce CHarm and PyHarm like the words see harm and pie harm. But it is indeed quite charming to pronounce CHarm like the word charm, especially when the library works like a charm.

Other spherical-harmonic-based libraries

Many other libraries for working with spherical harmonics are available, each having its pros and cons. Explore! A few examples are:

  • SHTOOLS: Fortran95 library with Python API,

  • SHTns: a C library for spherical harmonic transforms,

  • ISPACK: a Fortran library for spherical harmonic transforms,

  • Libsharp: a C99 library for spherical harmonic transforms,

  • healpy: a Python package to handle pixelated data on the sphere building on the HEALPix C++ library,

  • HARMONIC_SYNTH: a Fortran code for spherical harmonic synthesis written by the EGM2008 development team.

  • SPHEREPACK: a Fortran library of spherical harmonic transforms,

  • SHAVEL: a program for the spherical harmonic analysis of a horizontal vector field sampled in an equiangular grid on a sphere

  • ICGEM: Online calculation service for working with Earth and celestial gravitational models,

  • FaVeST: Fast Vector Spherical Harmonic Transforms in MATLAB.

  • SHBundle: Spherical harmonic analysis and synthesis in MATLAB up to high degrees and orders,

  • Spherical Harmonics Manipulator: Spherical harmonic synthesis in sparse points and grids (no longer maintained),

  • GrafLab and isGrafLab: MATLAB-based software packages for spherical harmonic synthesis of gravity field functionals up to high degrees and orders (tens of thousands and well beyond).

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyharm-0.4.3-pp310-pypy310_pp73-win_amd64.whl (969.2 kB view details)

Uploaded PyPyWindows x86-64

pyharm-0.4.3-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ x86-64

pyharm-0.4.3-pp310-pypy310_pp73-macosx_11_0_x86_64.whl (1.5 MB view details)

Uploaded PyPymacOS 11.0+ x86-64

pyharm-0.4.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded PyPymacOS 11.0+ ARM64

pyharm-0.4.3-cp313-cp313-win_amd64.whl (949.8 kB view details)

Uploaded CPython 3.13Windows x86-64

pyharm-0.4.3-cp313-cp313-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

pyharm-0.4.3-cp313-cp313-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pyharm-0.4.3-cp313-cp313-macosx_11_0_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

pyharm-0.4.3-cp313-cp313-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pyharm-0.4.3-cp312-cp312-win_amd64.whl (949.8 kB view details)

Uploaded CPython 3.12Windows x86-64

pyharm-0.4.3-cp312-cp312-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

pyharm-0.4.3-cp312-cp312-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pyharm-0.4.3-cp312-cp312-macosx_11_0_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

pyharm-0.4.3-cp312-cp312-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pyharm-0.4.3-cp311-cp311-win_amd64.whl (949.8 kB view details)

Uploaded CPython 3.11Windows x86-64

pyharm-0.4.3-cp311-cp311-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

pyharm-0.4.3-cp311-cp311-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pyharm-0.4.3-cp311-cp311-macosx_11_0_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

pyharm-0.4.3-cp311-cp311-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pyharm-0.4.3-cp310-cp310-win_amd64.whl (949.8 kB view details)

Uploaded CPython 3.10Windows x86-64

pyharm-0.4.3-cp310-cp310-musllinux_1_2_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

pyharm-0.4.3-cp310-cp310-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pyharm-0.4.3-cp310-cp310-macosx_11_0_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

pyharm-0.4.3-cp310-cp310-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file pyharm-0.4.3-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 3e30cb84702f5bee5ccce283c9326c7bd84f310d6e91d3c0d653e50ecae36b15
MD5 fed8c92c4162ae24ee6e81f7da0bf15f
BLAKE2b-256 0532149bf819a62655215f8cd963d83ed9c59d6585d8701d79bfcfd8967feb55

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 656102f974231f8c01e93915fe95cad01a305f2a8d27a1d536620113c54538fa
MD5 7542f0398a19fbf3f94f050dec98fd89
BLAKE2b-256 fe2efeaab9141b1de34091b7ee7d52c3af88670433f66e092e5e1ba69e46bfc3

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-pp310-pypy310_pp73-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-pp310-pypy310_pp73-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 e94b81979149438e460aa1b4a2858a973fd4dae620d8c6bbfcf69cd375abd1dc
MD5 135b0feddd09e8993d96d47b4b8e2169
BLAKE2b-256 c397e21b990d928a7a5ad3d5f0db63898408ed06c6ce3a8ea5a9163ffa7c0d60

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 38dcf8d74a721989c580f7bbe3921346b5b4d85923ac56d053d14acf3a4de75e
MD5 88160966cb01fc9800a37feaa5abf3d1
BLAKE2b-256 fd52eb03d73ed2854aa3a95565322bd9cab52a861fd1a8bb5575b85aae8186ab

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pyharm-0.4.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 949.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for pyharm-0.4.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 754b2c52d77be59927334f24f25863a798a3f4e9cbb0d32dc5111a3d6bab5b79
MD5 344abc614672fc40a02907b312991bbb
BLAKE2b-256 3a0ab766fdc15b7a5a5e60b76754c44ec4f9123a0e593687a67d4474c18a0541

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1c637f359bbebd0d2fe9bbf0757ab32b064f0f7de3db120344cbfc7305caa449
MD5 6adedfe2e5f101239b6b6dc5044a5647
BLAKE2b-256 8db1fe961bf11ae567483538e762ce586e701e3b9bd74dba4a259e38f57c6b4f

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b8ac1a0a8a9e18f35568ae09a9293211125046d901a6673fe9be9281ba7b51c8
MD5 c6d41d74ead475f6cda74e66a74e8a5e
BLAKE2b-256 da0ac8e521d049beaf24ca985d41b0c8b7253d29972c42ee1da74aaa02f4ee3c

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp313-cp313-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 b3bf9da117473bc1e578deb409f41bce29beb9ae1426313ede7ae8b86b6b58d6
MD5 d391dd50189c85ba90ce567f91b9daaf
BLAKE2b-256 7198a2e44d724800f3406f6ea56b8949483b35fd3048a1ebc554c0dafb41cbc7

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a5017d0d901d1a94db677b8970d584fc4927abb7a0cd3f57f2d41ddfea12c11f
MD5 37519a0de5891104286859756e9d87ca
BLAKE2b-256 56ec7503a65b2b4ea90c1915879e4034b25a3b4c08d590d56710a02cf72798dd

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pyharm-0.4.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 949.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for pyharm-0.4.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cc20f963f41f2c43bcc1a5217fd6ba382b92ac73398c804d3f89bbcf1f151ae3
MD5 b355a2bd64ae9f9ef9177cc68e7f3972
BLAKE2b-256 72c268eeea04b8ccda64e5827d8e1f873c2de128bd869e1413905d18f492a775

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4d63605943a53fa96548a5ea3be51afb2df698912f927ae5d2723223a1c7309c
MD5 68305cad45f9512d64c5917bab3ce9c5
BLAKE2b-256 ef46804e190585e56551abd815e72009faef6848cc0186203efde6757fa47486

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7a22edb18ece3c17cc885419b7a7f406f3dbecb592091b7df76b1ddbd4f93906
MD5 2b08515e522be9d8d6d9dd1679c1f245
BLAKE2b-256 fae8b2bbab9125d15e9a00a72e0160c0af03976a10818fa898a6af18a8536f0d

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c3c4bc3959b5ce753fbb0f10af216f2764e804eef35646c5a0c81790fc9c9880
MD5 5aaff06dc142ce688dcd30a347dc617d
BLAKE2b-256 cd3414126bb71728437c471b61a0da3e0e3c2c8ba445fd176020b3fea11841ac

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 25aa02b20835876151b71e5f199438caa953f6269b5f4aefb9a26e24dab86099
MD5 7d65e8bf1cf500016de117efaa04cb6b
BLAKE2b-256 2f5c08089c3755ccbcef57e227e1aefde5ab8a057762553ef8c020c194c69841

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyharm-0.4.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 949.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for pyharm-0.4.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 234f2554e0ae447228704b8ff35e3f8783cfccc72685db1afe90d5de91b76986
MD5 c7a585edfdd053b4ef5797e7e97e7c48
BLAKE2b-256 857a5833164282e45406b12f60887a263b5d9095ac0bbbef98a08b9e47548a02

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cb2fe71f9446e41858950efb275c2c7d52f63b1ab07ff557accbcc66f95f4c55
MD5 97a235864348e6d66f5d9bdc7e9f9418
BLAKE2b-256 7445f281b86b6f37ac12950492584526293cb749ac65a26993f7c07874f27629

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 23a33976257109274e3b4c373446b06511bb929a32c0f99ceacd4af962c9eef4
MD5 49b3d2e344052bd05bf2d2381ec4583c
BLAKE2b-256 66850f4f7e381e650b8e2ddf2a31e9d764eafb4a94d764c45e5b2a3aae17731e

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 cb1e0713a957a53c37d40228fd99386c1d071b067daf60428f74e6a30e86cc77
MD5 83dca76acae30dc758d67467a5c4a15c
BLAKE2b-256 f9373c3cbe267cad7e3cc2b87970b0f7f638c7b08997ee9424ca4023eac9121c

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cde5c602c92d6555f82d36091c7ccff6c6ddfca0b7663e3a593289e5f8e3e4f6
MD5 b0f0868297b5a766179236b6afce4bd1
BLAKE2b-256 2c67e02f579d595cd3a477a216492164583aa035ac859ec6e3fc868b7e01c4f1

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyharm-0.4.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 949.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.2

File hashes

Hashes for pyharm-0.4.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5ba03bef44f351035be4ad2a8131aae2934f21a9fbae96a260a35708f5d26c26
MD5 73585da882c272383353ccca489f01dd
BLAKE2b-256 f6b93b3e01f38601bd921a11d78417755c6f3a0edcd20a35c16ddea2d271c133

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0cb1fd4e0f49089a990195343145666ade13bb144fcce06b1f642d6f9c102e58
MD5 89feb423764fd341e644f51eac968ce9
BLAKE2b-256 69c2c0a0d53652dd42e8713e13e129c85b330b0011e05981ca1290a302115d3f

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0f324fb3ec04e13f0ed7af3581fc4e40acb0341d3c78626d9024f4c9ce02c6b8
MD5 d9306b7479a97b0f331a2634e8063207
BLAKE2b-256 fc043939aafca4029018022cc7d14acae7d9213d87eba7bb3f945afe19d0df23

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 5c1f3052c41c084feaeb025ec171d1ba876118fbc18b67d4b5e00c78c0650b0e
MD5 4fbe2c55159259475609b1a89d48a564
BLAKE2b-256 7b3bc845473f70d6b7543020e40b1f0aa8feb449e9fec030601ac7cbc63dd68c

See more details on using hashes here.

File details

Details for the file pyharm-0.4.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyharm-0.4.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0317bfe5b8d1b7541f41597a296cc5ca6c87dedf7c84131e6abd0ce0957a1eaa
MD5 3bc2e644e572c794ceb32ae61f031eb0
BLAKE2b-256 e2aec35e49cce7062590bff3ddd5d03af8ed8afa02dfcc99b3e2df1fe56805ec

See more details on using hashes here.

Supported by

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