从报告日期所在月起列出 36 个月的九星表。报告口径和 KP 岁差口径各一张,另有五级大运月采样。黄经仍走本系统恒星计算。

Co-Authored-By: Grok (agent loop)
This commit is contained in:
jesse-ux
2026-10-23 10:17:29 +08:00
co-authored by Grok (agent loop)
parent 4c405d2a51
commit 355946cd1a
5 changed files with 352 additions and 7 deletions
+53
View File
@@ -0,0 +1,53 @@
"""Report-month ephemeris uses the same sidereal longitudes as the chart function."""
from __future__ import annotations
from scripts.annual_native.report_ephemeris import build_report_ephemeris
from scripts.jyotish_engine import compute_chart_data
from scripts.report_render.parity_chapters import render_parity_chapters
from tests.report_english_fictional import fictional_case
LIMIT = 1e-6
def _delta(left: float, right: float) -> float:
return abs(((left - right + 180.0) % 360.0) - 180.0)
def test_report_frame_moon_matches_the_chart_function() -> None:
birth = fictional_case(0)
pack = build_report_ephemeris(
birth_year=birth["year"],
birth_month=birth["month"],
birth_day=birth["day"],
birth_hour=birth["hour"],
birth_minute=birth["minute"],
birth_second=birth["second"],
latitude=birth["lat"],
longitude=birth["lon"],
tz_hours=birth["tz"],
ayanamsa=birth["ayanamsa"],
node_mode=birth["node_mode"],
start_year=2026,
start_month=4,
start_source="report_date",
month_count=1,
)
assert pack["start_month"] == "2026-04"
assert len(pack["report_rows"]) == 9
assert len(pack["kp_rows"]) == 9
assert len(pack["vimshottari_rows"]) == 1
moon = next(row for row in pack["report_rows"] if row["planet"] == "Moon")
again, *_rest = compute_chart_data(
2026, 4, 1, 12, 0,
birth["lat"], birth["lon"], birth["tz"],
node_mode=birth["node_mode"], second=0, ayanamsa_name=birth["ayanamsa"],
)
assert _delta(float(moon["degree_raw"]), float(again["planets"]["Moon"]["degree_raw"])) <= LIMIT
text = render_parity_chapters(
{"worksheets": {"timing_and_predictive_systems": {"report_month_ephemeris": pack}}},
"en",
)
assert "Three-Year Predictive Ephemeris" in text
assert "Report frame, 9 rows." in text
assert "KP ayanamsa frame, 9 rows." in text