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
164 lines
6.3 KiB
Python
164 lines
6.3 KiB
Python
"""Raman v2 Amsayu bounded source scaffold.
|
|
|
|
Boundary:
|
|
- source-matched base formula, visible adjustment rules, and worked-example raw anchors only
|
|
- no admitted longevity/health outcome claim
|
|
- result layer remains blocked where the printed Bharana table layout is visually ambiguous
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any, Dict, Tuple
|
|
|
|
CHART_34_WORKED_EXAMPLE: Dict[str, Any] = {
|
|
"id": "chart_34",
|
|
"birth_heading": "Born 29/30-12-7879 at 1 a.m. (L.M.T.) at 9 N 50, 78 E 15.",
|
|
"longitude_minutes": {
|
|
"Sun": 15424,
|
|
"Moon": 5398,
|
|
"Mars": 1406,
|
|
"Mercury": 14076,
|
|
"Jupiter": 19077,
|
|
"Venus": 12717,
|
|
"Saturn": 20912,
|
|
"Lagna": 10938,
|
|
},
|
|
"term_granted_source_rows": {
|
|
"Sun": {"years": 5, "months": 1, "days": 13},
|
|
"Moon": {"years": 2, "months": 11, "days": 26},
|
|
"Mars": {"years": 7, "months": 0, "days": 10},
|
|
"Mercury": {"years": 10, "months": 4, "days": 17},
|
|
"Jupiter": {"years": 11, "months": 4, "days": 19},
|
|
"Venus": {"years": 3, "months": 7, "days": 2},
|
|
"Saturn": {"years": 8, "months": 6, "days": 21},
|
|
"Lagna": {"years": 6, "months": 8, "days": 8},
|
|
},
|
|
"bharana_notes": [
|
|
"Moon is vargottama",
|
|
"Mars occupies own sign in Rasi and Navamsa",
|
|
"Jupiter occupies own sign in Navamsa",
|
|
"therefore their periods are doubled",
|
|
],
|
|
"bharana_result_column_visible_fragments": [
|
|
"moon_row_fragment_appears_as_5_11_22_14",
|
|
"mars_jupiter_area_fragment_appears_as_0_20_22_9_08",
|
|
],
|
|
"bharana_result_rows_cross_page_verified": {
|
|
"Moon": {"years": 5, "months": 11, "days": 22},
|
|
"Mars": {"years": 14, "months": 0, "days": 20},
|
|
"Jupiter": {"years": 22, "months": 9, "days": 8},
|
|
},
|
|
"harana_notes": [
|
|
"Mars as a malefic in the 7th suffers Chakrapatha reduction by 1/6 after Bharana",
|
|
"Moon as a benefic in the 9th suffers Chakrapatha reduction by 1/8 after Bharana",
|
|
"Moon and Mercury in inimical signs suffer Satrukshetra reduction by 1/3",
|
|
"No planet is combust",
|
|
"Krurodaya does not apply even if evil planets occupy the Ascendant",
|
|
],
|
|
"final_term_of_life_table": {
|
|
"Sun": {"years": 5, "months": 1, "days": 13},
|
|
"Moon": {"years": 3, "months": 5, "days": 25},
|
|
"Mars": {"years": 11, "months": 8, "days": 17},
|
|
"Mercury": {"years": 6, "months": 11, "days": 1},
|
|
"Jupiter": {"years": 22, "months": 9, "days": 8},
|
|
"Venus": {"years": 3, "months": 7, "days": 1},
|
|
"Saturn": {"years": 8, "months": 6, "days": 22},
|
|
"Lagna": {"years": 6, "months": 8, "days": 8},
|
|
},
|
|
"final_total": {"years": 68, "months": 10, "days": 5},
|
|
}
|
|
|
|
AMSAYU_RULE_BOUNDARY: Dict[str, Any] = {
|
|
"source": "raman_horoscope_v2",
|
|
"pages": "PDF pp. 111-116 / printed pp. 104-109",
|
|
"admission_boundary": "calculation_only_no_longevity_or_health_outcome_claim",
|
|
"blocked_reason": "visible_bharana_table_layout_ambiguity_and_outcome_layer_not_admitted",
|
|
"resolved_items": [
|
|
"base_longitude_minutes_formula_visual_confirmation",
|
|
"term_granted_table_visual_confirmation",
|
|
"bharana_result_column_cross_page_continuation_recovered",
|
|
"harana_rule_list_visual_confirmation",
|
|
"final_term_of_life_total_visual_confirmation",
|
|
],
|
|
"remaining_issues": [
|
|
"chart_34_base_term_rows_contain_small_day_level_discrepancies_for_mars_venus_saturn",
|
|
"source_page_116_death_note_is_not_admitted_into_runtime_conclusion_layer",
|
|
],
|
|
}
|
|
|
|
|
|
def convert_longitude_to_navamsa_progress(longitude_minutes: int) -> Tuple[int, int]:
|
|
return divmod(longitude_minutes, 200)
|
|
|
|
|
|
def calculate_amsayu_term_granted(longitude_minutes: int) -> Dict[str, int]:
|
|
quotient, remainder = convert_longitude_to_navamsa_progress(longitude_minutes)
|
|
years = quotient % 12
|
|
months = (remainder * 12) // 200
|
|
residual = (remainder * 12) % 200
|
|
days = round((residual * 30) / 200)
|
|
if days == 30:
|
|
months += 1
|
|
days = 0
|
|
if months >= 12:
|
|
years += months // 12
|
|
months = months % 12
|
|
return {"years": years, "months": months, "days": days}
|
|
|
|
|
|
def add_360_day_terms(left: Dict[str, int], right: Dict[str, int]) -> Dict[str, int]:
|
|
total_days = (
|
|
left["years"] * 360
|
|
+ left["months"] * 30
|
|
+ left["days"]
|
|
+ right["years"] * 360
|
|
+ right["months"] * 30
|
|
+ right["days"]
|
|
)
|
|
return {
|
|
"years": total_days // 360,
|
|
"months": (total_days % 360) // 30,
|
|
"days": total_days % 30,
|
|
}
|
|
|
|
|
|
def summarize_chart_34_base_term_replay() -> Dict[str, Any]:
|
|
replay: Dict[str, Any] = {}
|
|
for body, minutes in CHART_34_WORKED_EXAMPLE["longitude_minutes"].items():
|
|
replay[body] = {
|
|
"source_row": CHART_34_WORKED_EXAMPLE["term_granted_source_rows"][body],
|
|
"computed": calculate_amsayu_term_granted(minutes),
|
|
}
|
|
return replay
|
|
|
|
|
|
def build_amsayu_scaffold() -> Dict[str, Any]:
|
|
return {
|
|
"status": "blocked",
|
|
"reason": AMSAYU_RULE_BOUNDARY["blocked_reason"],
|
|
"source": "raman_horoscope_v2",
|
|
"assertion_boundary": "calculation_only_no_longevity_or_health_outcome_claim",
|
|
"formula_summary": {
|
|
"convert_longitude_to_minutes_then_divide_by_200": True,
|
|
"quotient_counts_total_navamsas_from_aries": True,
|
|
"years_are_quotient_mod_12": True,
|
|
"fraction_of_year_comes_from_remainder_over_200": True,
|
|
"lagna_uses_same_base_formula": True,
|
|
},
|
|
"increase_rules": [
|
|
"exalted_or_retrograde_gives_thrice_the_years_obtained",
|
|
"vargottama_or_own_navamsa_or_own_rasi_or_own_drekkana_gives_twice",
|
|
"if_both_apply_use_only_the_strongest_factor_once",
|
|
],
|
|
"reduction_rules": [
|
|
"chakrapatha_same_as_pindayu_method",
|
|
"satrukshetra_reduces_one_third_after_chakrapatha_except_mars_and_retrogrades",
|
|
"astangata_reduces_one_half_after_prior_reductions",
|
|
"krurodaya_not_applied_in_amsayu_even_with_malefics_in_ascendant",
|
|
],
|
|
"worked_example": CHART_34_WORKED_EXAMPLE,
|
|
"base_term_replay": summarize_chart_34_base_term_replay(),
|
|
"blocked_by": AMSAYU_RULE_BOUNDARY["remaining_issues"],
|
|
"resolved_source_gaps": AMSAYU_RULE_BOUNDARY["resolved_items"],
|
|
}
|