Files
Jyotisha/scripts/pachakadi_relationships.py
ClaudeandClaude Opus 5.5 ac9be6f88c feat(techniques): port the astrologer upstream skill's missing techniques
Port from yinduzhanxing 5fb8379c (MIT): Naisargika, Kaala, Karaka, Tara,
Lagnamsaka, Yogardha, Mandooka, Paryaaya and Padanadhamsa dashas;
Sarvatobhadra, Kota and Kalanala chakras; Nakshatra Latta; Pachakadi;
Raman Amsayu and Pindayu. Producers and their upstream tests are copied;
scripts/upstream_technique_layers.py feeds them our natal and transit
positions and attaches chart.consultation_native_layers.upstream_techniques.

- dasha_registry: kaala and padanadhamsa keys (35 -> 37); the nine ported
  dashas are served by compute_dasha or fail closed with upstream's reason.
- technique_registry.json: 16 partial entries; README badges follow.
- Evidence lookup section `upstream_techniques` in the consultation tool.
- Boundaries: Kalanala carries no PyJHora (AGPL) grid coordinates;
  Padanadhamsa/Lagnamsaka run on our Narayana engine (no Rath Table 12,
  PVR co-lord variants or second cycle). PyJHora observers and the Amsayu
  worked-example scaffold live in scripts/research (root .py budget).
- PyJHora black-box cross-checks: Naisargika (lords/years) and Kaala
  (seed segment and fraction within 5e-4) on a public chart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
2026-11-07 14:44:37 +08:00

34 lines
1.4 KiB
Python

"""Pachakadi Samandha relationship layer.
Offsets are explicit profile data: the default 6/7/9/11 pattern is kept
separate from permanent and temporary planetary friendship tables.
"""
from typing import Dict, Mapping
DEFAULT_OFFSETS = {"pachaka": 6, "bodhaka": 7, "karaka": 9, "vedhaka": 11}
def calculate_pachakadi(
sign_indices: Mapping[str, int], *, reference: str = "Sun",
offsets: Mapping[str, int] = DEFAULT_OFFSETS,
) -> Dict[str, object]:
if reference not in sign_indices:
raise ValueError(f"missing reference planet: {reference}")
for name, offset in offsets.items():
if not 1 <= int(offset) <= 12:
raise ValueError(f"invalid house offset for {name}: {offset}")
origin = int(sign_indices[reference]) % 12
relationships = {}
for name, offset in offsets.items():
target = (origin + int(offset) - 1) % 12
matches = [planet for planet, sign in sign_indices.items() if int(sign) % 12 == target]
relationships[name] = {"offset_from_reference": int(offset), "target_sign_index": target, "planets": matches}
return {
"system": "pachakadi_relationships",
"status": "executed",
"reference": reference,
"offset_profile": dict(offsets),
"relationships": relationships,
"claim_boundary": "Relationship layer only; not permanent or temporary friendship.",
}