compute_panchanga
Calculate the five limbs of the Vedic almanac for an instant and location: tithi, vara (from sunrise), nakshatra, yoga, karana, with Rahu/Gulika kalam windows and polar-day fallback.
Instructions
Compute the panchanga — the five limbs of the Vedic almanac — for an instant: tithi (lunar day, with paksha and lord), vara (weekday reckoned from local sunrise, with its lord and the Rahu and Gulika Kalam windows as Julian Days), nakshatra (with pada), yoga (one of the 27 nithya yogas, with degrees remaining), and karana (half-tithi). Takes sidereal longitudes; all returned instants are Julian Days (UT). vara.from_sunrise reports HOW the weekday was reckoned: true means it was taken from an actual local sunrise (the Vedic definition); false means no sunrise exists to reckon from — the polar day or polar night, above about ±66.5° latitude — and the value is the observer's local CIVIL weekday as a documented fallback, which is a different quantity. Check it before presenting the vara at high latitude. vara.rahu_kalam being null is NOT the same signal: the Kalam windows can also be null while from_sunrise is true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jd | Yes | Julian Day number in UT1 (Universal Time) — not TT, not TDB. The engine converts to TT internally for the dynamical terms and uses UT1 directly for sunrise, which the vara is reckoned from; every returned instant, the Rahu and Gulika Kalam bounds included, is on this same UT1 scale. Supplying a TT/TDB Julian Day shifts sunrise by ΔT (≈ 69 s today), enough to move the vara for an instant near sunrise. | |
| sun | Yes | Sidereal longitude of Sun [0, 360) | |
| moon | Yes | Sidereal longitude of Moon [0, 360) | |
| latitude | Yes | Observer latitude in degrees. Required — the vara is reckoned from local sunrise, so it depends on the observer. | |
| longitude | Yes | Observer longitude in degrees, east positive. Required. | |
| elevation_m | No | Observer elevation in metres above sea level [-500, 9000] (default 0). Lowers the horizon by the dip and so moves sunrise — at 3650 m (Lhasa) 9.2 minutes earlier, enough to change the vara in that window. Pass the same value as search_muhurta for the same observer, or the two tools can report different weekdays for one instant. | |
| tz_offset_minutes | No | Offset of the observer's civil clock from UT, in minutes, in [-720, 840] (UTC-12:00 to UTC+14:00). Used only to name the vara's weekday. |