Lattice fitting engine
Project description
LatticeFit
Deterministic engine for discovering discrete multiplicative structure in positive real data.
Given measurements x_1, x_2, ..., x_n, LatticeFit tests whether they cluster near a geometric lattice:
x_i ~ A * r^(k_i/d), k_i in Z
and quantifies whether the alignment is statistically non-accidental.
Installation
pip install latticefit # core only
pip install "latticefit[plots]" # with matplotlib
Quick start
import latticefit
import numpy as np
# Standard Model fermion masses (GeV)
masses = [5.11e-4, 0.1057, 1.777, 0.00216, 1.275, 172.76,
0.00467, 0.0934, 4.18]
names = ["e", "mu", "tau", "u", "c", "t", "d", "s", "b"]
result = latticefit.fit(masses, anchor=5.11e-4,
base=latticefit.PHI, denom=4, names=names)
print(result.summary())
Features
- Deterministic scan -- no random initialization, reproducible results
- Anchor-shift invariance -- fits relative ratios, not absolute scale
- Structure-preserving null hypothesis -- permutation test that preserves the multiplicative spread of the data
- Auto-discovery -- scans over base r and denominator d automatically
- CLI --
latticefit data.csv --base phi --denom 4 - Publication-quality plots -- ladder diagrams, residual histograms
Background
LatticeFit was developed as the core fitting engine for the Hyperbolic Flavour Geometry programme, which derives Standard Model flavor parameters from the arithmetic geometry of compact hyperbolic 3-manifolds.
The golden ratio base r = phi = (1+sqrt(5))/2 is motivated by the
Lucas trace identity: closed geodesics of length 4m*log(phi) in
hyperbolic 3-manifolds have integer holonomy traces equal to Lucas numbers.
Lucas mode
# Scan with golden ratio base (motivated by hyperbolic geometry)
result = latticefit.fit(masses, base=latticefit.PHI, lucas=True)
Citation
If you use LatticeFit in your research, please cite:
Gentry, M.L. (2026). LatticeFit v0.3.0.
GitHub: https://github.com/drmlgentry/latticefit
PyPI: https://pypi.org/project/latticefit/
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file latticefit-0.3.1.tar.gz.
File metadata
- Download URL: latticefit-0.3.1.tar.gz
- Upload date:
- Size: 47.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78a1e87851485c3e1fd6d277c33592d4677da47226e2307e6393b87ea6ff758e
|
|
| MD5 |
cb18a73620c5d21b8501bdf115d5af42
|
|
| BLAKE2b-256 |
24657faab7f5000dba2905be9f3e7e01ccd5ccb0f6b8efe0d400afc5afee2934
|
File details
Details for the file latticefit-0.3.1-py3-none-any.whl.
File metadata
- Download URL: latticefit-0.3.1-py3-none-any.whl
- Upload date:
- Size: 64.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8722a11cee6a568bac9034763d0d75f8bbd710d32d22632b1812956873607367
|
|
| MD5 |
100f426a00239a08df3d7bc23dd30256
|
|
| BLAKE2b-256 |
79102d62ac1c0d0285546334df1b6dbd9676291bc0bbfc23b8f192d027943fda
|