feat(tajika): year lord by the Panchadhikari rule, ported from upstream c7117f92 (BUG-1214)
Round-4 astrologer ruling Q3. tajika.calc_panchadhikari_year_lord and its
missing pieces (Tri-Rasi tables, planet index maps, ayanamsa-aware PyJHora
lookups) plus references/tajika_panchavargiya_rules.json (blob e8c15ac3) are
ported verbatim from yinduzhanxing c7117f92, with one keyword added
(muntha_sign_idx): upstream builds the Muntha-lord candidate from the annual
Lagna + years; ours stays natal Lagna + completed years (BUG-1212).
Both annual producers (solar_return_full_report, cmd_tajika) call the new
tajika_year_lord.select_annual_year_lord, so the pack conflict gate compares
the same rule. Output carries candidates / candidate_list with Panchavargiya
score and engine, aspect flags, selection_basis and a one-sentence basis
(zh/en). The product path always uses the native proxy (PyJHora is AGPL, absent
from the API image and CI); JYOTISH_YEAR_LORD_PYJHORA_REFERENCE=1 restores the
upstream PyJHora lookup for research. Card varshesha_basis and the report
'Selection basis' rows show the sentence; the BUG-1212 stand-in label is gone.
Mudda Dasha and Tri-Pataka follow the selected year lord.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bc03bba26b
commit
0afcc2d9a3
+13
-8
@@ -545,7 +545,9 @@ def solar_return_full_report(
|
||||
except Exception as e:
|
||||
result['muntha'] = {'error': str(e)}
|
||||
|
||||
# 3. Year Lord(= Muntha 守护星)
|
||||
# 3. Year Lord:Panchadhikari 选法(占星师第四轮问 3,BUG-1214)。
|
||||
# 与 cmd_tajika 共用 tajika_year_lord.select_annual_year_lord;年盘不全
|
||||
# (降级模式或 Muntha 缺失)时才用 Muntha 主星,并写明 fallback。
|
||||
try:
|
||||
muntha_data = result.get('muntha', {})
|
||||
muntha_sign_val = muntha_data.get('muntha_sign_idx') if isinstance(muntha_data, dict) else None
|
||||
@@ -555,13 +557,16 @@ def solar_return_full_report(
|
||||
'reason': 'muntha_sign_required_for_year_lord',
|
||||
}
|
||||
else:
|
||||
year_lord_sign = muntha_sign_val % 12
|
||||
year_lord = SIGN_LORDS[SIGNS[year_lord_sign]]
|
||||
result['year_lord'] = {
|
||||
'year_lord': year_lord,
|
||||
'year_lord_sign_idx': year_lord_sign,
|
||||
'year_lord_sign': SIGNS[year_lord_sign],
|
||||
}
|
||||
from tajika_year_lord import select_annual_year_lord
|
||||
result['year_lord'] = select_annual_year_lord(
|
||||
sr,
|
||||
natal_asc_sign_idx=sr['birth_asc_sign_idx'],
|
||||
completed_years=age,
|
||||
ayanamsa_name=ayanamsa_name,
|
||||
birth_lat=birth_lat,
|
||||
birth_lon=birth_lon,
|
||||
birth_tz=birth_tz,
|
||||
)
|
||||
except Exception as e:
|
||||
result['year_lord'] = {'error': str(e)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user