Karana spans
panchangam.karana
Each six-degree Moon-Sun elongation interval is mapped to fixed or repeating Karana names.
Assurance
| Level | Current statement |
|---|---|
| Documented and traceable | Yes — the canonical record includes the process and a worked example. |
| Regression or reproduction checked | Linked to 3 repository test file(s). |
| Independently source-supported | Not independently verified at this level; current behavior is regression-pinned. |
Computation method
Method type: formula
Divide Moon-Sun elongation into 60 six-degree half-Tithis, solve each boundary with the selected engine, map fixed or sevenfold repeating names, and return at most two spans intersecting daylight.
Process
- Compute E = (Moon - Sun) modulo 360 at sunrise and set half-Tithi index h=floor(E/6) modulo 60.
- For h and the next two indices, bisect the engine elongation at h*6 and (h+1)*6 degrees.
- Discard a span ending before sunrise or starting after sunset.
- Use KARANA_FIXED when h is a fixed index; otherwise use KARANA_REPEATING[(h-1) modulo 7].
- Stop after two intersecting spans.
Formulae
Karana index
E = (M - S) mod 360
h = floor(E / 6) mod 60- M: engine Moon longitude
- S: engine Sun longitude
- h: half-Tithi index
Worked example
Hyderabad sunrise, 2026-06-11, Drik Ganita
Inputs
- Elongation: 302.5814559608 degrees
- Daylight: 05:41:11-18:50:12 IST
Calculation
- floor(302.5814559608 / 6) modulo 60 = 50.
- Solve consecutive six-degree crossings and retain the first two daylight-intersecting spans.
- Map indices through the fixed/repeating name tables.
Result
- Bava: 00:58:16-11:52:44 IST
- Balava: 11:52:44-22:36:44 IST; spans are not clipped to daylight
Method notes
- Boundary instants and the sunrise index inherit the selected engine's longitude model.
Contract
Owning layer: engine-core
Claim kind: deterministic-fact
Time basis: Sunrise-anchored day with crossings solved in UTC Julian day.
Inputs
- Moon-Sun elongation over the Panchangam day
Outputs
- Karana names and boundary instants
References and evidence
Evidence classes: astronomical, textual
Verification states: partially_verified, engine_pinned
Drik has representative comparisons; non-Drik spans are engine-pinned.
drik.sidereal_positions
Evidence class: astronomical
Verification state: partially_verified
Locator: Swiss Ephemeris Programmer's Documentation sections 3, 5.8 and 12.2 for calc_ut, sidereal flags and ayanamsa modes; representative date checks in tests/test_drik_engine.py and tests/test_ayanamsa.py
Last reviewed: 2026-08-27
Scope: Traces the Drik longitude API and preserves representative outputs. The current register does not contain an exhaustive independently published position-and-transition fixture, and it establishes no interpretive doctrine.
Sources
- Swiss Ephemeris — Astrodienst; Swiss Ephemeris 2.10 Programmer's Documentation and pyswisseph runtime used by the repository; authority type:
astronomical_reference - Drik Panchang day and festival pages — Drik Panchang; Location- and date-specific web pages; authority type:
published_panchangam
panchangam.non_drik_engine_outputs
Evidence class: astronomical
Verification state: engine_pinned
Locator: tests/test_surya_siddhanta_engine.py and tests/test_vakya_engine.py
Scope: Regression tests preserve the current Surya Siddhanta and Vakya Pancha-Anga and sky-event outputs. No independent published-Panchangam comparison set is registered, so engine-pinned output must not be described as externally verified.
Sources
- No external source is registered for this claim.
panchangam.calendar_semantics
Evidence class: textual
Verification state: needs_locator
Locator: No precise locator is registered.
Scope: Samvatsara, Ayana, Ritu, lunar-month, Paksha, weekday and Rasi labels combine astronomical calculations with calendar rollover conventions. They require criterion-level locators and regional-scope notes; astronomical correctness alone does not verify the naming convention.
Sources
- Muhurtha (Electional Astrology) — B. V. Raman; UBS Publishers' Distributors, 1993, ISBN 9788185674681, 181 catalogued pages; authority type:
modern_synthesis
The complete machine-readable source registry is available in provenance.json. A regression fixture or same-code reproduction is not independent verification.
Reproduce and review
Run the linked tests, then the complete offline contract:
python tools/verify_project.pyPublic surfaces
python-librarymcpicswebsite
Limitations
- Boundary times inherit the selected engine's longitude model.
Implementation
- owner:
telugu_panchangam/engines/drik.py—DrikGanitaEngine._karana_spans - owner:
telugu_panchangam/engines/surya_siddhanta.py—SuryaSiddhantaEngine._karana_spans - owner:
telugu_panchangam/engines/vakya.py—VakyaEngine._karana_spans
This route is generated from computations.json. Edit the registry and canonical reference prose in the same pull request as a behavior change.