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
229 lines
7.8 KiB
Python
229 lines
7.8 KiB
Python
"""Raman v2 Pindayurdaya bounded source scaffold.
|
|
|
|
Boundary:
|
|
- source-matched base tables, arc rule, and worked-example raw anchors only
|
|
- no admitted longevity/health outcome claim
|
|
- result layer remains blocked because the printed worked example contains
|
|
residual numeric inconsistencies that still need an external-source or
|
|
same-lineage clarification pass
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any, Dict, Tuple
|
|
|
|
PINDAYU_EXALTATION_YEARS: Dict[str, float] = {
|
|
"Sun": 19.0,
|
|
"Moon": 25.0,
|
|
"Mars": 15.0,
|
|
"Mercury": 12.0,
|
|
"Jupiter": 15.0,
|
|
"Venus": 21.0,
|
|
"Saturn": 20.0,
|
|
}
|
|
|
|
PINDAYU_DEBILITATION_YEARS: Dict[str, float] = {
|
|
"Sun": 9.5,
|
|
"Moon": 12.5,
|
|
"Mars": 7.5,
|
|
"Mercury": 6.0,
|
|
"Jupiter": 7.5,
|
|
"Venus": 10.5,
|
|
"Saturn": 10.0,
|
|
}
|
|
|
|
PINDAYU_DEEP_EXALTATION_DEGREES: Dict[str, int] = {
|
|
"Sun": 10,
|
|
"Moon": 33,
|
|
"Mars": 298,
|
|
"Mercury": 165,
|
|
"Jupiter": 95,
|
|
"Venus": 357,
|
|
"Saturn": 200,
|
|
}
|
|
|
|
# Original Vol2 PDF106/printed99 table visually rechecked 2026-09-27.
|
|
# These are deducted fractions, not retained fractions; 12th malefic loses all.
|
|
CHAKRAPATHA_HARANA_FRACTIONS: Dict[str, Dict[int, float]] = {
|
|
"malefic": {
|
|
12: 1,
|
|
11: 1 / 2,
|
|
10: 1 / 3,
|
|
9: 1 / 4,
|
|
8: 1 / 5,
|
|
7: 1 / 6,
|
|
},
|
|
"benefic": {
|
|
12: 1 / 2,
|
|
11: 1 / 4,
|
|
10: 1 / 6,
|
|
9: 1 / 8,
|
|
8: 1 / 10,
|
|
7: 1 / 12,
|
|
},
|
|
}
|
|
|
|
CHART_33_WORKED_EXAMPLE: Dict[str, Any] = {
|
|
"id": "chart_33",
|
|
"nirayana_longitudes": {
|
|
"Sun": (114, 26),
|
|
"Moon": (55, 3),
|
|
"Mars": (141, 49),
|
|
"Mercury": (135, 25),
|
|
"Jupiter": (224, 25),
|
|
"Venus": (123, 42),
|
|
"Saturn": (41, 36),
|
|
},
|
|
"arc_of_longevity": {
|
|
"Sun": (255, 34),
|
|
"Moon": (337, 57),
|
|
"Mars": (203, 49),
|
|
"Mercury": (330, 25),
|
|
"Jupiter": (230, 35),
|
|
"Venus": (233, 18),
|
|
"Saturn": (201, 36),
|
|
},
|
|
"sphutavarsha_source_rows": {
|
|
"Sun": {"years": 13, "months": 5, "days": 26},
|
|
"Moon": {"years": 23, "months": 5, "days": 19},
|
|
"Mars": {"years": 8, "months": 5, "days": 26},
|
|
"Mercury": {"years": 11, "months": 0, "days": 0},
|
|
"Jupiter": {"years": 9, "months": 7, "days": 9},
|
|
"Venus": {"years": 13, "months": 7, "days": 9},
|
|
"Saturn": {"years": 11, "months": 2, "days": 12},
|
|
},
|
|
"reduction_table_visible_rows": {
|
|
"Sun": {"years": 13, "months": 5, "days": 26},
|
|
"Moon": {"years": 23, "months": 5, "days": 19},
|
|
"Mars": {"years": 8, "months": 5, "days": 26},
|
|
"Mercury": {"years": 11, "months": 0, "days": 0},
|
|
"Jupiter": {"years": 9, "months": 7, "days": 9},
|
|
"Venus": {"years": 13, "months": 7, "days": 9},
|
|
"Saturn": {"years": 11, "months": 2, "days": 8},
|
|
},
|
|
"haranas": {
|
|
"Mars": {"chakrapatha": "1/6"},
|
|
"Jupiter": {"chakrapatha": "1/6"},
|
|
"Venus": {"satruksehtra": "1/3"},
|
|
},
|
|
"graha_ayurdaya": {
|
|
"Sun": {"years": 13, "months": 5, "days": 26},
|
|
"Moon": {"years": 23, "months": 5, "days": 19},
|
|
"Mars": {"years": 7, "months": 0, "days": 26},
|
|
"Mercury": {"years": 11, "months": 0, "days": 0},
|
|
"Jupiter": {"years": 8, "months": 0, "days": 3},
|
|
"Venus": {"years": 9, "months": 0, "days": 26},
|
|
"Saturn": {"years": 11, "months": 2, "days": 12},
|
|
},
|
|
"planet_total": {"years": 83, "months": 3, "days": 22},
|
|
"lagna_contribution": {
|
|
"sign": "Aquarius",
|
|
"degrees": 9,
|
|
"minutes": 42,
|
|
"years": 2,
|
|
"months": 10,
|
|
"days": 28,
|
|
},
|
|
"final_longevity": {"years": 86, "months": 2, "days": 20},
|
|
}
|
|
|
|
PINDAYURDAYA_RULE_BOUNDARY: Dict[str, Any] = {
|
|
"source": "raman_horoscope_v2",
|
|
"pages": "PDF pp. 104-111 / printed pp. 97-104",
|
|
"admission_boundary": "calculation_only_no_longevity_or_health_outcome_claim",
|
|
"blocked_reason": "source_numeric_discrepancy_requires_same_lineage_closure",
|
|
"resolved_items": [
|
|
"chakrapatha_7th_bhava_column_visual_confirmation",
|
|
"arc_of_longevity_to_sphutavarsha_formula_visual_confirmation",
|
|
"full_chart_33_graha_ayurdaya_rows_before_mars_recovered",
|
|
],
|
|
"remaining_issues": [
|
|
"chart_33_mercury_sphutavarsha_prints_11y0m0d_while_integer_rule_yields_11y0m5d",
|
|
"chart_33_mars_sphutavarsha_prints_8y5m26d_while_integer_rule_yields_8y5m27d",
|
|
"chart_33_saturn_formula_line_and_final_table_show_11y2m12d_but_reduction_table_visually_reads_11y2m8d",
|
|
],
|
|
}
|
|
|
|
|
|
def calculate_arc_of_longevity(
|
|
longitude_degrees: int,
|
|
longitude_minutes: int,
|
|
exaltation_degrees: int,
|
|
) -> Tuple[int, int]:
|
|
total_minutes = longitude_degrees * 60 + longitude_minutes
|
|
exaltation_minutes = exaltation_degrees * 60
|
|
difference = total_minutes - exaltation_minutes
|
|
if difference < 0:
|
|
difference += 360 * 60
|
|
if difference < 180 * 60:
|
|
difference = 360 * 60 - difference
|
|
return divmod(difference, 60)
|
|
|
|
|
|
def calculate_sphutavarsha_by_integer_minutes(
|
|
arc_degrees: int,
|
|
arc_minutes: int,
|
|
full_term_years: float,
|
|
) -> Dict[str, int]:
|
|
total_arc_minutes = arc_degrees * 60 + arc_minutes
|
|
weighted_minutes = int(total_arc_minutes * full_term_years)
|
|
year_minutes = 360 * 60
|
|
years = weighted_minutes // year_minutes
|
|
remaining = weighted_minutes % year_minutes
|
|
months = (remaining * 12) // year_minutes
|
|
remaining_month_fraction = (remaining * 12) % year_minutes
|
|
days = (remaining_month_fraction * 30) // year_minutes
|
|
return {"years": years, "months": months, "days": days}
|
|
|
|
|
|
def summarize_chart_33_source_discrepancies() -> Dict[str, Any]:
|
|
discrepancies: Dict[str, Any] = {}
|
|
for planet in ("Mars", "Mercury"):
|
|
arc_degrees, arc_minutes = CHART_33_WORKED_EXAMPLE["arc_of_longevity"][planet]
|
|
computed = calculate_sphutavarsha_by_integer_minutes(
|
|
arc_degrees,
|
|
arc_minutes,
|
|
PINDAYU_EXALTATION_YEARS[planet],
|
|
)
|
|
source_row = CHART_33_WORKED_EXAMPLE["sphutavarsha_source_rows"][planet]
|
|
discrepancies[planet] = {
|
|
"source_row": source_row,
|
|
"computed_integer_minute_rule": computed,
|
|
}
|
|
return discrepancies
|
|
|
|
|
|
def build_pindayurdaya_scaffold() -> Dict[str, Any]:
|
|
return {
|
|
"status": "blocked",
|
|
"reason": PINDAYURDAYA_RULE_BOUNDARY["blocked_reason"],
|
|
"source": "raman_horoscope_v2",
|
|
"assertion_boundary": "calculation_only_no_longevity_or_health_outcome_claim",
|
|
"base_tables": {
|
|
"exaltation_years": PINDAYU_EXALTATION_YEARS,
|
|
"debilitation_years": PINDAYU_DEBILITATION_YEARS,
|
|
"deep_exaltation_degrees": PINDAYU_DEEP_EXALTATION_DEGREES,
|
|
"chakrapatha_fractions": CHAKRAPATHA_HARANA_FRACTIONS,
|
|
},
|
|
"harana_order": [
|
|
"chakrapatha_harana",
|
|
"satruksehtra_harana",
|
|
"astangata_harana",
|
|
"krurodaya_harana",
|
|
],
|
|
"confirmed_rule_fragments": [
|
|
"intermediate_positions_use_half_term_plus_distance_from_debilitation",
|
|
"arc_of_longevity_keeps_difference_if_above_180_else_rectifies_from_360",
|
|
"satruksehtra_deducts_one_third_after_chakrapatha",
|
|
"mars_and_retrograde_exception_fragment_present_for_satruksehtra",
|
|
"astangata_deducts_one_half_after_prior_haranas",
|
|
"moon_combust_within_12_degrees_of_sun",
|
|
"venus_and_saturn_exempt_from_astangata_per_source_page",
|
|
"krurodaya_uses_lagna_amsas_divided_by_108",
|
|
],
|
|
"worked_example": CHART_33_WORKED_EXAMPLE,
|
|
"source_discrepancy_summary": summarize_chart_33_source_discrepancies(),
|
|
"blocked_by": PINDAYURDAYA_RULE_BOUNDARY["remaining_issues"],
|
|
"resolved_source_gaps": PINDAYURDAYA_RULE_BOUNDARY["resolved_items"],
|
|
}
|