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
54 lines
3.1 KiB
Python
54 lines
3.1 KiB
Python
"""PVR section 26.7: inclusive counting on the 27-nakshatra ring."""
|
||
from copy import deepcopy
|
||
|
||
SOURCE = 'https://vedicastrologer.org/articles/vedic_astro_textbook.pdf'
|
||
PROFILE = 'latta_pvr_26_7_27_star'
|
||
# Ordinal counts and directions transcribed from the author's published rules,
|
||
# not from an external software implementation. Ketu is not specified there.
|
||
RULES = {'Sun': (12, 1), 'Moon': (22, -1), 'Mars': (3, 1),
|
||
'Mercury': (7, -1), 'Jupiter': (6, 1), 'Venus': (5, -1),
|
||
'Saturn': (8, 1), 'Rahu': (9, -1)}
|
||
|
||
|
||
def _star(value):
|
||
if type(value) is not int or not 1 <= value <= 27:
|
||
raise ValueError('27-star index must be an integer in 1..27')
|
||
return value
|
||
|
||
|
||
def calculate_latta(*, transit_stars, natal_moon_star, natal_lagna_star, profile):
|
||
"""Accept already calculated, consistently configured nakshatras; no ephemeris."""
|
||
if profile != PROFILE:
|
||
raise ValueError('explicit latta_pvr_26_7_27_star profile required')
|
||
if not isinstance(transit_stars, dict) or set(transit_stars) != set(RULES):
|
||
raise ValueError('exactly Sun Moon Mars Mercury Jupiter Venus Saturn Rahu required; Ketu unspecified')
|
||
anchors = {'natal_moon': _star(natal_moon_star), 'natal_lagna': _star(natal_lagna_star)}
|
||
rows = []
|
||
for planet, (count, direction) in RULES.items():
|
||
source = _star(transit_stars[planet])
|
||
target = (source - 1 + direction * (count - 1)) % 27 + 1
|
||
rows.append(dict(planet=planet, source_index=source, target_index=target,
|
||
ordinal_count=count, direction='forward' if direction == 1 else 'backward',
|
||
matches=[name for name, star in anchors.items() if target == star]))
|
||
return dict(status='source_bounded_wired', variant_profile_id=PROFILE,
|
||
tradition_profile='pvr_integrated_approach_26_7', rows=rows,
|
||
source=dict(url=SOURCE, locator='section 26.7, printed pp.354–356, Table 70 Example 113'),
|
||
limits=['27-star inclusive counting only', 'Ketu and retrograde modifications unspecified',
|
||
'No 28-star mapping, event dates or deterministic predictions',
|
||
'Source example reproduction is not independent event validation'])
|
||
|
||
|
||
def build_latta_report(**kwargs):
|
||
result = calculate_latta(**kwargs)
|
||
lines = ['# Nakshatra Latta — PVR 27-star profile', '',
|
||
'Calculated contacts only. Interpret with natal significations and other executed timing methods.',
|
||
'', f'Profile: {PROFILE}', f'Source: {SOURCE} — section 26.7, Example 113', '',
|
||
'| Planet | Transit star | Latta target | Direction | Count | Natal contacts |',
|
||
'| --- | --- | --- | --- | --- | --- |']
|
||
for row in result['rows']:
|
||
lines.append('| ' + ' | '.join(str(row[key]) for key in
|
||
('planet', 'source_index', 'target_index', 'direction', 'ordinal_count', 'matches')) + ' |')
|
||
lines.extend(['', *result['limits']])
|
||
return dict(status=result['status'], customer_export_admitted=False, evidence_appendix=[result],
|
||
exports=dict(markdown='\n'.join(lines), ai_evidence_bundle=deepcopy(result)))
|