- Dharmagya
- panchang-ts docs
- Matching & Doshas
Matching & Doshas
panchang-ts · v5.0.0 · MIT
Ashtakoot 36-point matching, Tamil Pathu Porutham, pairwise Mangal dosha verdicts, Kaal Sarp subtypes, and Pitru dosha.
Ashtakoot — 36-point matching
import { computeAshtakoot } from 'panchang-ts';
// North Indian, 36-point — Varna, Vashya, Tara, Yoni,
// Graha Maitri, Gana, Bhakoot, Nadi (max 1/2/3/4/5/6/7/8).
const match = computeAshtakoot(
{ rashi: 4, nakshatra: 9 },
{ rashi: 0, nakshatra: 1 },
);
// → { totalScore: 0..36, koots: KootScore[8], cancellations: string[] }
// Opt-in Bhakoot cancellations need extra natal data:
// `lagnaRashi` enables same-lagna-lord + same-7th-lord rules;
// `navamsaRashi` enables the same-Navamsa-lord rule.
const richer = computeAshtakoot(
{ rashi: 4, nakshatra: 9, lagnaRashi: 7, navamsaRashi: 2 },
{ rashi: 0, nakshatra: 1, lagnaRashi: 1, navamsaRashi: 5 },
);Inputs are NatalMoon shapes — rashi and nakshatra indices (0-based), optionally extended with lagnaRashi / navamsaRashi for the richer Bhakoot cancellation rules.
Pathu Porutham — Tamil ten-fold matching
import { computePathuPorutham } from 'panchang-ts';
// Binary pass/fail per koot. Three vetoes (Yoni, Rajju, Vedha)
// flip `recommended` regardless of count.
const tp = computePathuPorutham(
{ rashi: 4, nakshatra: 9 },
{ rashi: 0, nakshatra: 1 },
);
tp.totalPasses; // 0..10
tp.recommended; // no veto + ≥5 passesMangal dosha — a pairwise verdict
import { computeMangalDosha, computeMangalCompatibility } from 'panchang-ts';
// Manglik is a PAIRWISE verdict, not a per-chart one: when both partners are
// Manglik the two afflictions neutralise each other, so the pair is clean
// where a Manglik/non-Manglik pair is not.
const m = computeMangalCompatibility(boyChart, girlChart);
m.afflicted; // false when neither is Manglik AND when both are
m.cancellations; // ['both natives Manglik — mutual cancellation']
m.boy; m.girl; // each native's own MangalDoshaInfo, severity included
// Per-chart detail:
computeMangalDosha(d1);
// Mars in 1/2/4/7/8/12 from Lagna, Moon, AND Venus (Drik rule set).
// Cancellations: Mars in own sign/exalted, conjunct Jup/Moon/Venus,
// or aspected by Jupiter (5/7/9 sign-aspect).
// Severity (anshik/purna) is computed pre-cancellation.Kaal Sarp and Pitru dosha
import { computeKaalSarp, computePitruDosha } from 'panchang-ts';
computeKaalSarp(d1);
// 12 subtypes by Rahu's house: anant, kulik, vasuki, shankhpal, padma,
// mahapadma, takshak, karkotak, shankhachud, ghatak, vishdhar, sheshnag.
computePitruDosha(d1);
// Pandit-consensus 4-trigger set (rules cited by ≥3 of 6 surveyed
// pandit sources): Sun+Rahu conjunction (any house), Sun+Saturn
// conjunction (any house), Rahu in 9th house, 9th-lord conjunct Rahu.
// Minority/expansive rules (Sun in 9th alone, Ketu in 4th, 9th lord
// in dusthana, etc.) are intentionally excluded.Limitations
| Area | Limitation |
|---|---|
| Ashtakoot Vashya | uses single-vashya per rashi |
| Bhakoot Parivartana | the rashi-lord-exchange cancellation needs per-graha position data not carried by the NatalMoon shape and is not modelled |
