← All packages

Frames & geometry

star-galactic 0.1.0

Equatorial ⇄ galactic directions

Public state: Released & Verified. The registry label is RELEASED. What the states mean →

Apache-2.0 Released & Verified single file

Summary

Galactic longitude and latitude from equatorial directions and back, in the Hipparcos (ICRS) and IAU 1958 (B1950) definitions; agrees with ERFA, astropy and SPICE to 1.1e-13 deg on 600 directions in both directions and refuses out-of-range input.

Run in your browser

Edit the code and press Run (or Ctrl+Enter). Python runs in your browser with this package's published code. The first run downloads Python once (about 12 MB).

Runs in the browser: all 43 tests pass in the browser's Python (Pyodide 314.0.7, Python 3.14.2), measured on 20 October 2026.

Use it on your computer

No account and no GitHub needed. Download, then install with one command:

python -m pip install star_galactic-0.1.0-py3-none-any.whl

In Python: import star_galactic

Get started →

Cite it, and its bill of materials

For a paper, a report or a supplier file: the citation in two formats, and the software bill of materials (SBOM) in the two standard formats, with the fingerprint of the wheel.

@software{cavazzini_star_galactic_0_1_0,
  author  = {Cavazzini, Andrea},
  title   = {{star-galactic}: Equatorial ⇄ galactic directions},
  version = {0.1.0},
  year    = {2026},
  url     = {https://andrea07072000.github.io/S.T.A.R.-/software/star_galactic/},
  note    = {Apache-2.0. Source: https://github.com/Andrea07072000/S.T.A.R.-, commit dc09f61d}
}

For developers

Install directly from the public repository:

python -m pip install "star-galactic @ git+https://github.com/Andrea07072000/S.T.A.R.-.git@dc09f61dcee098d518f070d6a23a8815defc1109#subdirectory=packages/star_galactic"

README · tests · evidence (GitHub)

Technical sheet

Package
star-galactic
Import name
star_galactic
Version
0.1.0
Licence
Apache-2.0
Python
>=3.9
Dependencies
none (standard library only)
Capability
star.frames.galactic
Maturity
Released & Verified (RELEASED)
Published commit
dc09f61d

Requirements

  • R1 System "icrs": galactic pole at ICRS 192.85948, +27.12825 and longitude of the celestial pole 122.93192 (ESA 1997, Hipparcos, vol. 1, 1.5.3).
  • R2 System "b1950": galactic pole at B1950.0 192.25, +27.4 and longitude of the celestial pole 123.0 (IAU 1958). Reproduces Meeus Example 13.b.
  • R3 The two functions are inverse of each other; longitudes out are in [0, 360). Measured on 600 directions (100 down to 1e-6 deg from a galactic pole), in both directions: within 9e-14 deg of ERFA ("icrs") and within 1.1e-13 deg of astropy and SPICE ("b1950").
  • R4 Every function returns finite floats or raises ValueError: non-numeric, boolean, NaN or infinite input, latitude or declination outside [-90, 90], longitude or right ascension outside [-360, 360], an unknown system.

Limits (what is not claimed)

No precession and no FK4 → FK5 conversion: a J2000 direction passed with "b1950" gives a wrong answer by degrees, and an FK5 J2000 direction passed with "icrs" differs from other libraries' FK5-based galactic frames by about 0.02 arcsec. The "icrs" system is compared with one library (ERFA) plus its published definition, not two libraries. At a galactic pole the longitude is undefined and the value returned is arbitrary within [0, 360).

Release gate

Computed by the registry from the result files, with the same function that decides RELEASED.

Mutation score, latest measure of each module (needs at least 0.850)
  • star_galactic.py 1.000 (2026-10-06)
Independent implementations written by others (needs 2)
astropy FK4NoETerms <-> Galactic, ERFA icrs2g / g2icrs (C), SPICE pxform FK4 <-> GALACTIC
Also compared with, not counted
published values: Meeus, Astronomical Algorithms, Example 13.b
Result
Released & Verified

Evidence in the registry

CheckStatusRecordedWhat was observed
Clean install from the release tagVERIFIED2026-10-06pytest outside the tree: 43 passed in 0.26s
Unit testsVERIFIED2026-10-0643 passed in 0.40s
ReviewVERIFIED2026-10-06Requirements, interface, units, data provenance, dependency surface and failure behaviour reviewed
ReviewVERIFIED2026-10-06Re-running the cross-check gives a byte-identical evidence file
Reference valueVERIFIED2026-10-06(12.959251, 6.046298): within 4.9e-5 deg of the printed values (printed to 1e-4) (suite: 43 passed in 0.40s)
Cross-check with independent librariesVERIFIED2026-10-06star_galactic reproduces the Hipparcos (ICRS) and IAU 1958 (B1950) galactic frames of three independent libraries, in both directions
BenchmarkVERIFIED2026-10-06largest difference by lineage: erfa (icrs): 8.8e-14 deg; astropy (b1950): 1.0e-13 deg; spice (b1950): 1.0e-13 deg

Fingerprints (SHA-256)

star_galactic-0.1.0-py3-none-any.whlcd897abaa0ce377ca5cb483570798e4521171f28da5fad02ef6dca7f59146ded
star_galactic.py173b30d65a0a48cb8868df6db740ce2245c04246ac2cb0dbf7b916a6417a5fbc
star_galactic-0.1.0-source.zip1bf0904de659b85096c9ab4aa54e86ec651aebc57d92380fc68811842f250f39

results