← All packages

Time & Earth rotation

star-epoch 0.1.0

Julian and Besselian epochs

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

Apache-2.0 Released & Verified single file

Summary

Julian and Besselian epochs to and from two-part Julian Dates; agrees with ERFA to 5e-13 yr, with skyfield and five SPICE constants to 3e-10 day on 600 dates and 600 epochs, 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 15 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_epoch-0.1.0-py3-none-any.whl

In Python: import star_epoch

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_epoch_0_1_0,
  author  = {Cavazzini, Andrea},
  title   = {{star-epoch}: Julian and Besselian epochs},
  version = {0.1.0},
  year    = {2026},
  url     = {https://andrea07072000.github.io/S.T.A.R.-/software/star_epoch/},
  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-epoch @ git+https://github.com/Andrea07072000/S.T.A.R.-.git@dc09f61dcee098d518f070d6a23a8815defc1109#subdirectory=packages/star_epoch"

README · tests · evidence (GitHub)

Technical sheet

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

Requirements

  • R1 julian_epoch and jd_from_julian_epoch: J2000.0 = JD 2451545.0 and a Julian year of 365.25 days. Reproduce J1900.0, J1950.0, J2000.0 and J2100.0 exactly.
  • R2 besselian_epoch and jd_from_besselian_epoch: B1900.0 = JD 2415020.31352 and a tropical year of 365.242198781 days (Lieske 1979). Reproduce B1950.0 = JD 2433282.4235 and J2000.0 = B2000.0012775.
  • R3 Dates are Julian Dates in two parts; the inverse functions return a day ending in .5 and a fraction in [0, 1). Measured on 600 dates and 600 epochs over 1600–2400: epochs within 5e-13 yr of ERFA, Julian epochs within 5e-13 yr of skyfield, dates identical to ERFA and within 3e-10 day of skyfield and of five SPICE constants.
  • R4 Every function returns finite floats or raises ValueError: non-numeric, boolean, NaN or infinite input, a date outside JD 2086302.5 … 2816787.5, a fraction outside [-1, 1], an epoch outside [1000, 3000].

Limits (what is not claimed)

No time-scale conversion: the epoch is in the scale of the date passed (TT for catalogue epochs). Besselian epochs are compared with one full library (ERFA) and two SPICE constants, not two full libraries. An epoch held in one float resolves about 17 microseconds near the year 2000; use the two-part date when that matters. The agreement with ERFA is exact because the arithmetic is the same: it shows the same convention, not an independent derivation of the constants, which come from the publications above.

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_epoch.py 1.000 (2026-10-06)
Independent implementations written by others (needs 2)
ERFA epj / epb / epj2jd / epb2jd (C), skyfield Time.J / Timescale.J (Julian epochs), SPICE b1900 / b1950 / j1900 / j1950 / j2100
Also compared with, not counted
published values: Lieske 1979: B1950.0 = JD 2433282.4235
Result
Released & Verified

Evidence in the registry

CheckStatusRecordedWhat was observed
Unit testsVERIFIED2026-10-0615 passed in 0.33s
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-06JD 2433282.42345905, within 4.1e-5 day of the printed value (printed to 1e-4) (suite: 15 passed in 0.33s)
Cross-check with independent librariesVERIFIED2026-10-06star_epoch converts Julian and Besselian epochs to and from Julian Dates as three independent libraries do
BenchmarkVERIFIED2026-10-06Besselian epochs have one full library lineage (ERFA) plus two SPICE fixed points; Julian epochs have two (ERFA, skyfield) plus three SPICE fixed points
Clean install from the release tagVERIFIED2026-10-06pytest outside the tree: 15 passed in 0.10s

Fingerprints (SHA-256)

star_epoch-0.1.0-py3-none-any.whla252f6bbaf5589338e460e7089df5090e668ae04b3128659e390f93922483a44
star_epoch.py305bee05dfcb9153cc06397813e6897c8f84412fdccd86d8b326f5380103d5b3
star_epoch-0.1.0-source.zipd945939b551b9cef4d64188edb4ef8dac9d983b817584324900d5a50a032b236

results