yantra/patha/kalachakra.js
कालचक्र-दशा, Parāśara 46.52–46.100 as the local edition carries it, on the 108-cell lattice (27 nakṣatras × 4 pādas).
245 lines · 0 exports
The header, as the file states it
What it loads
What it exports
SS verses named in the header
none in the registry
The channels it runs in
Every function, what it calls, who calls it
19 top-level functions read from the source; the doc line is the comment above each; calls and callers are resolved across the registry’s modules by name. Line numbers are the file’s at engine 3f94072.
Every hard check on a variant's chains: the sum against the paramāyus, deha and jīva against the verse (where attested), the reversal pair, and the steps. Returns the counts and the failures, so each reading's proof is runnable.
The motion named on the pair {a, b} (either direction), or null for a plain one-sign step. The Karka–Siṃha pair is one sign apart: 46.98 calls the markaṭī "going backward", and in the chains that step reverses direction only beside a frog-jump (…Kanyā → Karka → Siṃha → Mithuna… and its reverse); stepsOf labels it there and nowhere else.
The 108-cell index of a sidereal longitude (degrees): cell = 4n + (p − 1), nakṣatra n = 0…26, pāda p = 1…4. The longitude is rounded ONCE, to a micro-arcsecond, and the cell and the arc gone in it are the quotient and remainder of that one integer by the pāda — so the arc gone is always less than a pāda and never disagrees with the cell (the second review found the earlier float floor and a separa
Which chain a nakṣatra (0-based) and pāda take, and the aṃśaka that keys its years. opts.types: 'text' (46.77) or 'standard'.
The chain of a nakṣatra (0…26) and pāda (1…4): the nine signs, their years, the paramāyus and its check, deha and jīva, the motions.
All sixteen chains with their checks.
The nine periods of one chain from an instant (rational spandas) at which `gone` of its paramāyus (rational years) is already elapsed; the signs whose years lie inside `gone` are marked elapsed and the running one carries its balance. With 0 ≤ gone < paramāyus exactly one sign is running [theorem: the nine spans partition the paramāyus].
Kālacakra mahādaśās from a birth instant (days since the Kali epoch). The Moon's sidereal longitude from the pañcāṅga (the text tier) gives the cell; 46.93 gives the elapsed years; opts.cycles (default 1) adds the following pādas' chains [standard continuation, not in the verses]; opts.types 'text' | 'standard' (46.77); opts.year as dasha.js.
Sub-periods of a period: the nine signs of its own chain in order, each (period × sign-years ÷ the chain's sum) [standard, not in 46.52–100]. The second argument is the period's chain, or the daśā result it came from (the chain is then found by the period's cell).