panchang-ts 4.1.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -434,9 +434,12 @@ computeKaalSarp(d1);
434
434
  // mahapadma, takshak, karkotak, shankhachud, ghatak, vishdhar, sheshnag.
435
435
 
436
436
  computePitruDosha(d1);
437
- // 9-rule classical catalog: Sun+Rahu/Ketu/Saturn in 9th; 9th lord
438
- // debilitated/combust/dusthana; Saturn or nodes in 9th from natal Moon;
439
- // malefics (Mars/Saturn/Rahu/Ketu) in 5th from natal Moon.
437
+ // Pandit-consensus 4-trigger set (rules cited by ≥3 of 6 surveyed
438
+ // pandit sources): Sun+Rahu conjunction (any house), Sun+Saturn
439
+ // conjunction (any house), Rahu in 9th house, 9th-lord conjunct Rahu.
440
+ // Drik panchang publishes no Pitru calculator; minority/expansive
441
+ // rules (Sun in 9th alone, Ketu in 4th, 9th lord in dusthana, etc.)
442
+ // are intentionally excluded.
440
443
  ```
441
444
 
442
445
  **Limitations.** Ashtakoot Vashya koot uses single-vashya per rashi.
package/dist/index.cjs CHANGED
@@ -8081,11 +8081,9 @@ var GRAHA_NAME_BY_INDEX = [
8081
8081
  "Venus",
8082
8082
  "Saturn"
8083
8083
  ];
8084
- var DUSTHANA_HOUSES = /* @__PURE__ */ new Set([6, 8, 12]);
8085
8084
  function computePitruDosha(chart) {
8086
8085
  const sun = chart.planets.find((p) => p.planet === "Sun");
8087
8086
  const rahu = chart.planets.find((p) => p.planet === "Rahu");
8088
- const ketu = chart.planets.find((p) => p.planet === "Ketu");
8089
8087
  const saturn = chart.planets.find((p) => p.planet === "Saturn");
8090
8088
  const ninthRashi = chart.bhava.houses[8].rashi.index;
8091
8089
  const ninthLordName = GRAHA_NAME_BY_INDEX[RASHI_LORD[ninthRashi]];
@@ -8094,31 +8092,14 @@ function computePitruDosha(chart) {
8094
8092
  if (sun.house === rahu.house) {
8095
8093
  reasons.push(`Sun + Rahu conjunction in house ${sun.house}`);
8096
8094
  }
8097
- if (sun.house === ketu.house) {
8098
- reasons.push(`Sun + Ketu conjunction in house ${sun.house}`);
8099
- }
8100
8095
  if (sun.house === saturn.house) {
8101
8096
  reasons.push(`Sun + Saturn conjunction in house ${sun.house}`);
8102
8097
  }
8103
- if (sun.house === 9) {
8104
- reasons.push("Sun in the 9th house (pitru bhava)");
8105
- }
8106
8098
  if (rahu.house === 9) {
8107
8099
  reasons.push("Rahu in the 9th house");
8108
8100
  }
8109
- if (ketu.house === 4) {
8110
- reasons.push("Ketu in the 4th house");
8111
- }
8112
- if (ninthLordName !== "Sun") {
8113
- if (ninthLordName !== "Saturn" && ninthLord.house === rahu.house) {
8114
- reasons.push(`9th-lord ${ninthLordName} conjunct Rahu in house ${ninthLord.house}`);
8115
- }
8116
- if (ninthLordName !== "Saturn" && ninthLord.house === saturn.house) {
8117
- reasons.push(`9th-lord ${ninthLordName} conjunct Saturn in house ${ninthLord.house}`);
8118
- }
8119
- }
8120
- if (DUSTHANA_HOUSES.has(ninthLord.house)) {
8121
- reasons.push(`9th-lord ${ninthLordName} in dusthana (house ${ninthLord.house})`);
8101
+ if (ninthLordName !== "Sun" && ninthLord.house === rahu.house) {
8102
+ reasons.push(`9th-lord ${ninthLordName} conjunct Rahu in house ${ninthLord.house}`);
8122
8103
  }
8123
8104
  return {
8124
8105
  afflicted: reasons.length > 0,
@@ -8917,7 +8898,7 @@ function applyEkadhipatyaSodhana(grid, occupied) {
8917
8898
 
8918
8899
  // src/jyotish/yogasCatalog.ts
8919
8900
  var KENDRA_HOUSES = [1, 4, 7, 10];
8920
- var DUSTHANA_HOUSES2 = [6, 8, 12];
8901
+ var DUSTHANA_HOUSES = [6, 8, 12];
8921
8902
  var RASHI_LORDS = [
8922
8903
  "Mars",
8923
8904
  "Venus",
@@ -9213,7 +9194,7 @@ var VIPAREETA_RAJA_RULE = {
9213
9194
  const rashiIdxs = distinct.map((l) => ctx.planetByName[l].rashi.index);
9214
9195
  if (!rashiIdxs.every((r) => r === rashiIdxs[0])) return null;
9215
9196
  const housePos = ctx.planetByName[distinct[0]].house;
9216
- if (!DUSTHANA_HOUSES2.includes(housePos)) return null;
9197
+ if (!DUSTHANA_HOUSES.includes(housePos)) return null;
9217
9198
  return {
9218
9199
  reasons: [
9219
9200
  `6th/8th/12th lords (${distinct.join(", ")}) conjunct in ${ctx.planetByName[distinct[0]].rashi.name} (house ${housePos})`
@@ -9382,7 +9363,7 @@ var DARIDRA_YOGA_RULE = {
9382
9363
  }
9383
9364
  const lord2 = houseLord(ctx.lagnaRashi, 2);
9384
9365
  const p2 = ctx.planetByName[lord2];
9385
- if (DUSTHANA_HOUSES2.includes(p2.house)) {
9366
+ if (DUSTHANA_HOUSES.includes(p2.house)) {
9386
9367
  reasons.push(`2nd lord ${lord2} in dusthana (house ${p2.house})`);
9387
9368
  }
9388
9369
  return reasons.length > 0 ? { reasons } : null;
package/dist/index.d.cts CHANGED
@@ -2226,26 +2226,25 @@ declare function computeMangalDosha(chart: BirthChart): MangalDoshaInfo;
2226
2226
  declare function computeKaalSarp(chart: BirthChart): KaalSarpDoshaInfo;
2227
2227
  /**
2228
2228
  * Compute Pitru Dosha — affliction by ancestors. Drik panchang does not
2229
- * publish a Pitru Dosha calculator, so the reference set is multi-pandit
2230
- * consensus across ProKerala, AstroSage, AstroNidan, Vinay Bajrangi, and
2231
- * the classical BPHS Ch. 37 9th-lord rules. Nine triggers are tested:
2229
+ * publish a Pitru Dosha calculator, so the reference set is the
2230
+ * pandit-consensus subset (rules cited by ≥3 of 6 surveyed pandit
2231
+ * sources: AstroTalk, PujaYagna, MyPandit, Astrobix, Vinay Bajrangi,
2232
+ * GaneshaSpeaks). Four triggers are tested:
2232
2233
  *
2233
2234
  * A. Sun + Rahu conjunction (any house) — the most universally cited
2234
- * Pitru Dosha rule.
2235
- * B. Sun + Ketu conjunction (any house) — same axial principle.
2235
+ * Pitru Dosha rule; Sun (pitru karaka) shadowed by Rahu.
2236
2236
  * C. Sun + Saturn conjunction (any house) — classical malefic
2237
2237
  * affliction of the pitru karaka.
2238
- * D. Sun in the 9th house (pitru bhava) — Sun karaka of the father
2239
- * in the house of ancestors.
2240
2238
  * E. Rahu in the 9th house — Rahu directly afflicting pitru bhava.
2241
- * F. Ketu in the 4th house — matri/pitri axis affliction.
2242
2239
  * G. 9th-house lord conjunct Rahu — pitru-bhava lord afflicted by
2243
2240
  * Rahu. Skipped when the 9th lord is Sun (already covered by A).
2244
- * H. 9th-house lord conjunct Saturn — pitru-bhava lord afflicted by
2245
- * Saturn. Skipped when the 9th lord is Sun (covered by C) or
2246
- * Saturn itself (vacuous).
2247
- * I. 9th-house lord in a dusthana (6, 8, or 12) — classical BPHS
2248
- * Ch. 37 rule for an afflicted 9th lord.
2241
+ *
2242
+ * Rules dropped relative to earlier expansive readings (each cited by
2243
+ * ≤1 surveyed pandit source): Sun + Ketu conjunction, Sun in 9th alone
2244
+ * (Sun in own pitru bhava is often considered favorable), Ketu in 4th
2245
+ * (commonly classed as Matri Dosha, not Pitru), 9th lord + Saturn, and
2246
+ * 9th lord in dusthana (a generic weak-9th-lord rule, not a Pitru
2247
+ * Dosha rule per pandit consensus).
2249
2248
  *
2250
2249
  * Any one trigger sets `afflicted: true`; all matching triggers are
2251
2250
  * surfaced in `reasons`.
package/dist/index.d.ts CHANGED
@@ -2226,26 +2226,25 @@ declare function computeMangalDosha(chart: BirthChart): MangalDoshaInfo;
2226
2226
  declare function computeKaalSarp(chart: BirthChart): KaalSarpDoshaInfo;
2227
2227
  /**
2228
2228
  * Compute Pitru Dosha — affliction by ancestors. Drik panchang does not
2229
- * publish a Pitru Dosha calculator, so the reference set is multi-pandit
2230
- * consensus across ProKerala, AstroSage, AstroNidan, Vinay Bajrangi, and
2231
- * the classical BPHS Ch. 37 9th-lord rules. Nine triggers are tested:
2229
+ * publish a Pitru Dosha calculator, so the reference set is the
2230
+ * pandit-consensus subset (rules cited by ≥3 of 6 surveyed pandit
2231
+ * sources: AstroTalk, PujaYagna, MyPandit, Astrobix, Vinay Bajrangi,
2232
+ * GaneshaSpeaks). Four triggers are tested:
2232
2233
  *
2233
2234
  * A. Sun + Rahu conjunction (any house) — the most universally cited
2234
- * Pitru Dosha rule.
2235
- * B. Sun + Ketu conjunction (any house) — same axial principle.
2235
+ * Pitru Dosha rule; Sun (pitru karaka) shadowed by Rahu.
2236
2236
  * C. Sun + Saturn conjunction (any house) — classical malefic
2237
2237
  * affliction of the pitru karaka.
2238
- * D. Sun in the 9th house (pitru bhava) — Sun karaka of the father
2239
- * in the house of ancestors.
2240
2238
  * E. Rahu in the 9th house — Rahu directly afflicting pitru bhava.
2241
- * F. Ketu in the 4th house — matri/pitri axis affliction.
2242
2239
  * G. 9th-house lord conjunct Rahu — pitru-bhava lord afflicted by
2243
2240
  * Rahu. Skipped when the 9th lord is Sun (already covered by A).
2244
- * H. 9th-house lord conjunct Saturn — pitru-bhava lord afflicted by
2245
- * Saturn. Skipped when the 9th lord is Sun (covered by C) or
2246
- * Saturn itself (vacuous).
2247
- * I. 9th-house lord in a dusthana (6, 8, or 12) — classical BPHS
2248
- * Ch. 37 rule for an afflicted 9th lord.
2241
+ *
2242
+ * Rules dropped relative to earlier expansive readings (each cited by
2243
+ * ≤1 surveyed pandit source): Sun + Ketu conjunction, Sun in 9th alone
2244
+ * (Sun in own pitru bhava is often considered favorable), Ketu in 4th
2245
+ * (commonly classed as Matri Dosha, not Pitru), 9th lord + Saturn, and
2246
+ * 9th lord in dusthana (a generic weak-9th-lord rule, not a Pitru
2247
+ * Dosha rule per pandit consensus).
2249
2248
  *
2250
2249
  * Any one trigger sets `afflicted: true`; all matching triggers are
2251
2250
  * surfaced in `reasons`.
package/dist/index.js CHANGED
@@ -8079,11 +8079,9 @@ var GRAHA_NAME_BY_INDEX = [
8079
8079
  "Venus",
8080
8080
  "Saturn"
8081
8081
  ];
8082
- var DUSTHANA_HOUSES = /* @__PURE__ */ new Set([6, 8, 12]);
8083
8082
  function computePitruDosha(chart) {
8084
8083
  const sun = chart.planets.find((p) => p.planet === "Sun");
8085
8084
  const rahu = chart.planets.find((p) => p.planet === "Rahu");
8086
- const ketu = chart.planets.find((p) => p.planet === "Ketu");
8087
8085
  const saturn = chart.planets.find((p) => p.planet === "Saturn");
8088
8086
  const ninthRashi = chart.bhava.houses[8].rashi.index;
8089
8087
  const ninthLordName = GRAHA_NAME_BY_INDEX[RASHI_LORD[ninthRashi]];
@@ -8092,31 +8090,14 @@ function computePitruDosha(chart) {
8092
8090
  if (sun.house === rahu.house) {
8093
8091
  reasons.push(`Sun + Rahu conjunction in house ${sun.house}`);
8094
8092
  }
8095
- if (sun.house === ketu.house) {
8096
- reasons.push(`Sun + Ketu conjunction in house ${sun.house}`);
8097
- }
8098
8093
  if (sun.house === saturn.house) {
8099
8094
  reasons.push(`Sun + Saturn conjunction in house ${sun.house}`);
8100
8095
  }
8101
- if (sun.house === 9) {
8102
- reasons.push("Sun in the 9th house (pitru bhava)");
8103
- }
8104
8096
  if (rahu.house === 9) {
8105
8097
  reasons.push("Rahu in the 9th house");
8106
8098
  }
8107
- if (ketu.house === 4) {
8108
- reasons.push("Ketu in the 4th house");
8109
- }
8110
- if (ninthLordName !== "Sun") {
8111
- if (ninthLordName !== "Saturn" && ninthLord.house === rahu.house) {
8112
- reasons.push(`9th-lord ${ninthLordName} conjunct Rahu in house ${ninthLord.house}`);
8113
- }
8114
- if (ninthLordName !== "Saturn" && ninthLord.house === saturn.house) {
8115
- reasons.push(`9th-lord ${ninthLordName} conjunct Saturn in house ${ninthLord.house}`);
8116
- }
8117
- }
8118
- if (DUSTHANA_HOUSES.has(ninthLord.house)) {
8119
- reasons.push(`9th-lord ${ninthLordName} in dusthana (house ${ninthLord.house})`);
8099
+ if (ninthLordName !== "Sun" && ninthLord.house === rahu.house) {
8100
+ reasons.push(`9th-lord ${ninthLordName} conjunct Rahu in house ${ninthLord.house}`);
8120
8101
  }
8121
8102
  return {
8122
8103
  afflicted: reasons.length > 0,
@@ -8915,7 +8896,7 @@ function applyEkadhipatyaSodhana(grid, occupied) {
8915
8896
 
8916
8897
  // src/jyotish/yogasCatalog.ts
8917
8898
  var KENDRA_HOUSES = [1, 4, 7, 10];
8918
- var DUSTHANA_HOUSES2 = [6, 8, 12];
8899
+ var DUSTHANA_HOUSES = [6, 8, 12];
8919
8900
  var RASHI_LORDS = [
8920
8901
  "Mars",
8921
8902
  "Venus",
@@ -9211,7 +9192,7 @@ var VIPAREETA_RAJA_RULE = {
9211
9192
  const rashiIdxs = distinct.map((l) => ctx.planetByName[l].rashi.index);
9212
9193
  if (!rashiIdxs.every((r) => r === rashiIdxs[0])) return null;
9213
9194
  const housePos = ctx.planetByName[distinct[0]].house;
9214
- if (!DUSTHANA_HOUSES2.includes(housePos)) return null;
9195
+ if (!DUSTHANA_HOUSES.includes(housePos)) return null;
9215
9196
  return {
9216
9197
  reasons: [
9217
9198
  `6th/8th/12th lords (${distinct.join(", ")}) conjunct in ${ctx.planetByName[distinct[0]].rashi.name} (house ${housePos})`
@@ -9380,7 +9361,7 @@ var DARIDRA_YOGA_RULE = {
9380
9361
  }
9381
9362
  const lord2 = houseLord(ctx.lagnaRashi, 2);
9382
9363
  const p2 = ctx.planetByName[lord2];
9383
- if (DUSTHANA_HOUSES2.includes(p2.house)) {
9364
+ if (DUSTHANA_HOUSES.includes(p2.house)) {
9384
9365
  reasons.push(`2nd lord ${lord2} in dusthana (house ${p2.house})`);
9385
9366
  }
9386
9367
  return reasons.length > 0 ? { reasons } : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "panchang-ts",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "Pure TypeScript Hindu Panchang calculations. Tithi, Nakshatra, Yoga, Karana, Vara, and more. Offline-first, React Native compatible.",
5
5
  "author": "Ishank",
6
6
  "license": "MIT",