Skip to main content

Vector Spherical Harmonics analysis tools (rotation, glide, quadrupole)

Project description

Vector Spherical Harmonics (VSH) analysis toolkit


A modern Python package for vector spherical harmonics (VSH) analysis — primarily for astrometric and celestial reference frame studies (e.g., Gaia, VLBI).

Reference: Mignard & Klioner (2012), A&A 547, A59 doi:10.1051/0004-6361/201219927

Package structure

vsh_tools/
 ├── basis.py           # scalar & vector spherical harmonic bases
 ├── bootstrap.py       # bootstrap confidence estimation
 ├── diagnostics.py     # goodness-of-fit, residual diagnostics
 ├── fit.py             # LSQ fitting interface (vsh_fit)
 ├── glide.py           # glide decomposition, GA-related utilities
 ├── legacy.py          # consolidated older workflow
 ├── linalg.py          # linear algebra helpers
 ├── metrics.py         # stats & chi² computations
 ├── outliers.py        # outlier clipping
 ├── power.py           # power spectrum and significance
 ├── rgq.py             # rotation–glide–quadrupole functions
 ├── scalar_basis.py    # scalar spherical harmonics
 ├── significance.py    # significance of harmonics
 ├── stats.py           # statistical utilities
 └── transforms.py      # conversions between parameter representations

Quick test

import numpy as np
from vsh_tools.fit import vsh_fit
from vsh_tools.rgq import vsh_func

# true params: (g1,g2,g3,r1,r2,r3)
p_true = np.array([30, 24, 12, 20, 30, 15])
ra  = np.deg2rad(np.linspace(0, 360, 1000))
dec = np.deg2rad(np.linspace(-90, 90, 1000))

dra, ddec = vsh_func(ra, dec, p_true, l_max=1)
dra_err = ddec_err = np.ones_like(dra)

out = vsh_fit(dra, ddec, dra_err, ddec_err, np.rad2deg(ra), np.rad2deg(dec),
              l_max=1, pos_in_rad=False, fit_type="full")
print(out["pmt"])  # estimated coefficients

For any questions and comments, please contact me at niu.liu@foxmail.com.

Project details


Download files

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

Source Distribution

vsh_tools-0.1.0.tar.gz (63.6 kB view details)

Uploaded Source

Built Distribution

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

vsh_tools-0.1.0-py3-none-any.whl (83.9 kB view details)

Uploaded Python 3

File details

Details for the file vsh_tools-0.1.0.tar.gz.

File metadata

  • Download URL: vsh_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 63.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for vsh_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2ea8e1005bbadfac143ca29f5c41b3de12ff1145031a7b747729473435f09916
MD5 b15dfd74117359874a8471b6ea63bca9
BLAKE2b-256 d8318897080d654ff5d1b96d56fa4152ea761dd303b4a93f9c4e933faca4d66b

See more details on using hashes here.

File details

Details for the file vsh_tools-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vsh_tools-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 83.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for vsh_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39634769a9ec9c2ac1313a8cba1cc42e09b9f724459347b6cea16301b74936f3
MD5 a3e1567384d94be0395e9d399bfd8f29
BLAKE2b-256 31e1e56a7b9eb2ea38fc617f4bcad67693762a10faa8fa20fe7c653173fbee40

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