Skip to content
Documentation · all sections

Strength, Yogas & Karakas

panchang · v5.4.0 · MIT

Graha drishti, six-fold Shadbala, Bhava Bala, Ashtakavarga with reductions, ~25 named yogas with cancellations, and Jaimini karakas.

Everything here works from the d1 chart, or from raw birth data. Both come from Birth Charts.

Aspects (Drishti)

import { computeAspects } from 'panchang-ts';

// Every graha aspects the 7th; Mars, Jupiter and Saturn add special
// aspects (Mars 4+8, Jupiter 5+9, Saturn 3+10).
const aspects = computeAspects(d1);                             // BPHS 7th-only on nodes
const aspExt  = computeAspects(d1, { nodeAspects: '5-and-9' }); // KP/BV Raman extension

aspects.Mars;   // [3, 6, 7]
aspects.Rahu;   // [7]
aspExt.Rahu;    // [5, 7, 9]

The nodes aspect only the 7th by default, which is the BPHS rule. Pass nodeAspects: '5-and-9' if you want the KP and B. V. Raman extension instead. An empty string means the default. Any other value throws a PanchangError with code INVALID_INPUT; before 5.4 TypeScript ignored it and gave the 7th only, while Go already returned the error.

Shadbala and Bhava Bala

import { computeShadbala, computeBhavaBala } from 'panchang-ts';

// Shadbala — 7 visible grahas, 6 components, in Virupas (60 V = 1 Rupa).
// Sthana = Uchcha + Saptavargaja (D1/D2/D3/D7/D9/D12/D30 dignity sum)
//        + Ojha-Yugma (rashi + navamsa parity) + Drekkana, range [0, 420 V].
// Dig is the directional cusp. Kala = Nathonatha (5 V an hour from apparent
// midnight to apparent noon) + Paksha (the Sun-Moon elongation at birth). Chesta
// is the retrograde bucket, Naisargika a fixed rank, Drik the weighted aspects.
const bala = computeShadbala(birth, loc);
bala.Sun.total;      // 408.97

// Bhava Bala — 12-bhava strength built on top of Shadbala.
// Per-bhava: { bhavadhipati, dik, drik, sthana, total }.
const bhavaBala = computeBhavaBala(birth, loc);
bhavaBala.houses[0].total;   // 424.46

Both take birth data rather than a chart, and build what they need internally. A call takes a fraction of a millisecond; see Performance.

Nathonatha Bala, the day-and-night part of Kala Bala, follows BPHS (Ch. 27, v8-9): 5 virupas an hour, from 0 at apparent midnight to 60 at apparent noon. Apparent noon is the midpoint of the sunrise at or before birth and the sunset after it, and apparent midnight is twelve hours later. The Sun, Jupiter and Venus take that value, the Moon, Mars and Saturn take 60 minus it, and Mercury always takes 60.

Ashtakavarga

import { computeAshtakavarga } from 'panchang-ts';

// 12-rashi bindu grids (BPHS Ch. 66).
const av = computeAshtakavarga(d1);
av.sarvashtaka;             // 12 cells, each 0..56, total 337
av.bhinnashtaka.Jupiter;    // 12-cell grid; Jupiter total = 56 (chart-invariant)
// Other invariants: Sun=48, Moon=49, Mars=39, Mercury=54, Venus=52, Saturn=39.

// Trikona + Ekadhipatya Sodhana reductions (BPHS Ch. 67):
const avR = computeAshtakavarga(d1, { reductions: true });
avR.reduced!.sarvashtaka;

The reduced grids are only filled in when you ask for them, so read reduced only on a call that passed reductions: true.

Named yogas

import { computeYogas, computeNavamsa } from 'panchang-ts';

// ~25 named yogas — Pancha Mahapurusha (Ruchaka/Bhadra/Hamsa/Malavya/Sasha),
// lunar (Gajakesari, Sunapha, Anapha, Durudhura, Kemadruma), solar
// (Budha-Aditya, Veshi, Vasi, Ubhayachari), Raja (kendra/trikona-lord,
// Dharma-Karmadhipati, Vipareeta, Lakshmi), Dhana (2-11, 5-9, Vasumati),
// Vargottama, Yogakaraka, Neecha Bhanga, Daridra.
const yogas = computeYogas(d1);
// → [{ name, type, reasons[], bhanga?: { applies, reasons[] } }, …]
yogas[0];   // { name: 'Anapha', type: 'lunar', reasons: ['Saturn in 12th from Moon'] }

// Filter by type / pass D9 for Vargottama:
const d9 = computeNavamsa(birth, loc);
const all = computeYogas(d1, { types: ['raja', 'dhana'], navamsa: d9 });
all.map(y => y.name);   // ['Raja Yoga']

Some yogas carry a cancellation annotation. The five Pancha Mahapurusha yogas report bhanga when the yoga-forming graha shares a rashi with the Sun or the Moon; Gajakesari reports it when Jupiter is combust or debilitated. Neecha Bhanga checks four conditions:

  • the dispositor in a kendra from Lagna or Moon
  • the lord of the exaltation rashi in a kendra from Lagna or Moon
  • another graha exalted and in a kendra from the debilitated graha
  • the dispositor aspecting the debilitated planet

Kemadruma forms when no visible graha other than the Sun sits with the Moon or in the 2nd or 12th from it, the same exclusion Sunapha and Anapha make. Before 5.4 the Sun alone was enough to break it. A birth at Delhi on 21 February 1950 at 02:24 UTC has the Moon in Meena and no visible graha in Meena, Mesha or Kumbha except the Sun in Kumbha, and now lists Kemadruma with the reason 'No planet but the Sun in 2nd, 12th, or conjunct with Moon (the Sun does not break Kemadruma)'.

An unknown entry in types, or an unknown nodeAspects, throws a PanchangError with code INVALID_INPUT. Before 5.4 TypeScript returned an empty list for an unknown type; Go already returned the error.

Jaimini karakas

import { computeJaiminiKarakas } from 'panchang-ts';

// Atmakaraka (highest degree-in-rashi) … Darakaraka (lowest).
const k7 = computeJaiminiKarakas(d1);   // 7-graha Parashara default
k7.Atmakaraka;   // 'Saturn'
k7.Darakaraka;   // 'Jupiter'

The 8-graha Jaimini variant adds Rahu, ranked on its reversed degree, and inserts Pitrukaraka at the 5th place. In Go it is a function of its own, ComputeJaimini8Karakas, new in 5.4.

const k8 = computeJaiminiKarakas(d1, { variant: '8-jaimini' });
k8.Pitrukaraka;   // 'Rahu'