pylgframework
A software framework for the Local Group.
The barycentre of the Local Group is routinely adopted as a point estimate. pylgframework replaces the
single-line centre-of-mass calculation with a Monte Carlo that propagates the observational uncertainty of the
member galaxies, and returns the barycentre together with its uncertainty region.
Frutos Plaza, M. (2026). Membership Systematics of the Local Group Barycentre: Uncertainty Region, Dependence on Member Galaxies, and Consistency with the CMB Dipole. (manuscript; data and code at doi:10.5281/zenodo.23440772)
Status
Installation
pip install -e . # core: numpy, pandas, astropy
pip install -e ".[rebound]" # adapter for REBOUND simulations
pip install -e ".[test]" # development and tests
Quick start
from pylgframework import barycentre, compare, fiducials
res = barycentre(fiducials.WU, n=1000, seed=2000)
print(res) # position, velocity, principal axes, CMB-frame speed, assumptions
res.median_position # kpc, Galactocentric
res.axes # 1-sigma principal axes of the barycentre cloud (kpc)
res.vcmb("4") # speed w.r.t. the CMB (16th, 50th, 84th percentile, km/s)
res.cloud # DataFrame with every realization
# Paired audit of two literature fiducials (identical random draws)
compare(fiducials.WU, fiducials.VDM2012, n=1000, seed=3000)
Available fiducials: WU (Wu et al. 2026), SAWALA (Sawala et al. 2025), VDM2019, VDM2012 and
VDM2012_3B (van der Marel et al. 2012, four-body and faithful three-body variants). Each one carries its
reference and notes (fiducials.WU.reference).
Memberships: "2" (MW+M31), "3M" (+M33), "3L" (+LMC), "4" (all four).
Assumptions
- Observables (distance modulus, proper motions, radial velocity, mass) are drawn from Gaussians truncated at ±2σ (the effective standard deviation is about 0.88σ).
- Sky positions are held fixed; the MW is at rest at the origin of the Galactocentric frame (R0 = 8.122 kpc, v⊙ = (12.9, 245.6, 7.78) km/s).
- The output is the uncertainty induced by the declared errors, not a complete physical uncertainty region.
- The uncertainty model is fixed across fiducials unless
sigmas=is supplied.
Reproducibility
Realization i of an ensemble with seed s uses numpy.random.default_rng([s, i]). This scheme is part of the
public interface. The test suite reproduces Table 1 and Sects. 3 and 4 of the manuscript:
pytest # fast tests
Verified against the published values (Table 1 of the manuscript) with astropy 7.2.0 (Linux, Python 3.12) and astropy 8.0.2 (Linux, Python 3.12; Windows, Python 3.11).
References
The bibliography of the manuscript, including the sources of every fiducial and of the CMB dipole, is in
docs/references.bib.
License
MIT.
Metadata
Release files for pylgframework 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pylgframework-0.1.0.tar.gz | 16.1 kB | Without provenance | Details for pylgframework-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pylgframework-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pylgframework-0.1.0-py3-none-any.whl |
Total release size: 30.1 kB
Release files / pylgframework-0.1.0.tar.gz
| Download URL | pylgframework-0.1.0.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b121cd128edb4fe35ce99d2780198fd8302181aebc512d09a1a9ac9ef6da6acc
|
|
BLAKE2b-256 checksum How to use checksums |
09034a23a5342afa43e34fdb1ca6f89ca2be299c0f85e68161194fad87d17bb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.6
|
Release files / pylgframework-0.1.0-py3-none-any.whl
| Download URL | pylgframework-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba23b263f7fe639e790fee3c4975ade0354fbfe973a63ed61f9a56b65299f670
|
|
BLAKE2b-256 checksum How to use checksums |
2669f7d59d05afcaa3f411cb0851916800790fcc4d415eaa1fd4210a00dd6d52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.6
|
Security for pylgframework 0.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.