A robust sexagesimal, metrological, and astronomical engine for Babylonian mathematics. From the Eduba to the Jupyter Notebook.
Project description
🏺 MesoMath v2.1.0
The Mesopotamian Computational Engine for Python.
MesoMath is a high-precision computational framework engineered for the rigorous study of ancient Mesopotamian mathematics, metrology, chronology, timekeeping, and archaeoastronomy. It provides native command-line environments (CLI), Jupyter integration, and authentic epigraphic support (Old Babylonian transliteration and Unicode cuneiform rendering).
✨ What's New in v2.1.0?
MesoMath has evolved into a unified metapackage, structurally decoupling core arithmetic from chronological anchoring systems:
mesomathCore: Introduces theBabFclass for native sexagesimal (base-60) fractional arithmetic without floating-point rounding artifacts.mesotimesSubsystem: A dedicated historical engine driving:- Empirical & Proleptic Chronology: Seamless alignment with historical cuneiform registers.
- Elastic Timekeeping: Shifting horizon-based day boundaries (Sunset-to-Sunset) and dynamic nocturnal watches (maṣṣarātu).
- Archaeoastronomy: High-fidelity celestial positioning and eclipse matrices.
🚀 Quick Start
Installation
Install the complete environment globally using pipx (recommended for CLI apps):
$ pipx install mesomath
The Scribal Console
Launch the pre-configured advanced interactive environment:
$ ibabcalc
1. Dimensional Arithmetic & Fractions
MesoMath manages geometric dimensions and base-60 rational numbers natively:
from mesomath import Blen, Bsur
# Objects understand localized metrological ratios
width = Blen('3 ninda')
area = Bsur('1 sar')
# Dimensional descent via division engine
length = area / width
print(length.prtf()) # Output: '1/3 ninda'
2. Epigraphic Authenticity
Export mathematical computations directly into cuneiform strings or scholarly transliterations:
from mesomath import Bcap
vol = Bcap('3 bariga 2 ban')
print(vol.translit) # Output: '3(barig) 2(ban2) še'
print(vol.cuneiform) # Output: 𒑗 𒑐 𒊺
3. Chronology & Archaeoastronomy
Translate continuous timeline anchors into historical calendars and calculate complex planetary visibilities:
from mesomath import ChronDate
# Instantiate a target Julian date
date = ChronDate.from_julian(-378, 5, 17)
print(date.babylonian)
# Output: 'Year 26 of Artaxerxes II, month: 2 (Aiaru), day: 14'
# Generate localized micro-historical data grids
date.day_ephemeris(city='Susa')
=================================================================
MESOPOTAMIAN DAILY EPHEMERIS: SUSA
=================================================================
Julian Day: 1583129.5 | Civil Calendar: Julian (-378/5/17)
Chronology: Year 26 of Artaxerxes II, month: 2 (Aiaru), day: 14
-----------------------------------------------------------------
SOLAR CONTEXT:
Sunrise : 01:46 UT | Sunset : 15:32 UT
Transit : 08:39 UT | Season : Day: 52 of spring
-----------------------------------------------------------------
LUNAR INTERVALS (Phenomena in current lunation):
[Neomenia] NA Interval: -68.35 min (Time from Sunset to Moonset)
[Mid-Month] MI-MUSH: 19.77 min (Simultaneous visibility)
[End-Month] KUR: -894.34 min (Dawn crescent disappearance)
-----------------------------------------------------------------
PLANETARY VISIBILITY ( Twilight vs. Arc of Vision ):
* Mercury -> Invisible / Glare (Required Av: 12.0°)
* Venus -> VISIBLE (Morning Star) (Required Av: 6.0°)
* Mars -> VISIBLE (Morning Star) (Required Av: 14.0°)
* Jupiter -> VISIBLE (Evening Star) (Required Av: 9.0°)
* Saturn -> VISIBLE (Evening Star) (Required Av: 11.0°)
=================================================================
# Visualize the sky timeline across ancient nocturnal watches
date.night_at_a_glance(city='Susa')
===================================================================
NIGHT AT A GLANCE: SUSA (-378-05-17)
===================================================================
UT Hours: 09 11 13 15 17 19 21 23 01 03 05 07 09
Local H.: 12 14 16 18 20 22 00 02 04 06 08 10 12
-------------------------------------------------------------------
Sky/Sun : #############::. .::###############
-------------------------------------------------------------------
Moon : =====================
-------------------------------------------------------------------
Mercury : ---------- -----------------
Venus : ------------ ----------------
Mars : - ---------------------
Jupiter : -----------------------
Saturn : ------------------------ -----
===================================================================
Legend: # Day : Civ/Nav Twilight . Ast Twilight Night
- Planet above horizon = Moon above horizon
📚 Documentation
The complete user manual, tutorials, and mathematical references are available at mesomath.readthedocs.io.
🏛️ Acknowledgments & Sources
- Mathematical Metrology: Structured upon the breakthrough historical analyses of Christine Proust (Tablettes mathématiques de Nippur, 2007) and canonical scribal lexical lists.
- Archaeoastronomy & Eclipses: Driven by the raw ephemeris computational methods and historical eclipse logs compiled in NASA's Five Millennium Canon of Eclipses by Fred Espenak and Jean Meeus.
- Chronological Registers: Grounded on the empirical data frameworks from Babylonian Chronology: 626 B.C. – A.D. 75, by Richard A. Parker and Waldo H. Dubberstein (2nd edition, Brown University Press, 1971).
Developed by jccsvq
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 mesomath-2.1.0.tar.gz.
File metadata
- Download URL: mesomath-2.1.0.tar.gz
- Upload date:
- Size: 577.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.1 cpython/3.11.2 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
900922d005c3bfd8d4024d77b1d118bd50fb59fa9d6ec5992335daff5646e573
|
|
| MD5 |
1bff73b7bf1d6fa963626042f0d127eb
|
|
| BLAKE2b-256 |
05557095896b56f9dc0c1b3def5a87c083a3ba778685603ec85e37d389702b76
|
File details
Details for the file mesomath-2.1.0-py3-none-any.whl.
File metadata
- Download URL: mesomath-2.1.0-py3-none-any.whl
- Upload date:
- Size: 343.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.1 cpython/3.11.2 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37de0c8faa6f046d039bbf567e90fe3f184c07e235d3658da9b1cd738e3a3cf7
|
|
| MD5 |
a009253f936ec3856fedfd65cf9e8803
|
|
| BLAKE2b-256 |
29245e2dbe6589a23042d642059d264e2d232d1050b04412b638f287b5195501
|