docs(tasks): Niryaana Shoola strength counts the nine grahas (upstream 258e08e3)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Ad9rqAB8pXXvyzh7f4X8v
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9f5c0084db
commit
0c996bbbc4
@@ -1,3 +1,3 @@
|
||||
# 上游 Niryaana Shoola @ 9f08b57b(2026-10-18)
|
||||
# 上游 Niryaana Shoola @ 9f08b57b,副本已更新到 258e08e3(2026-10-18)
|
||||
|
||||
起运星座按 `pvr_niryaana_shoola_ayur_rasi_strength_v1` 选:比较第二宫与第八宫,依次看宫内行星数、所有行星的星座相位数(Jaimini 星座相位,宫主不加权)、宫内有无入旺行星;仍平手则 `blocked`,不硬选。行星集合与上游 full-reading 传入的一致(含罗睺、计都)。只出主运。
|
||||
起运星座按 `pvr_niryaana_shoola_ayur_rasi_strength_v1` 选:比较第二宫与第八宫,依次看宫内行星数、所有行星的星座相位数(Jaimini 星座相位,宫主不加权)、宫内有无入旺行星;仍平手则 `blocked`,不硬选。计数的行星固定为九曜(七曜 + 罗睺 + 计都),外行星、Upagraha 不计,节点不加权(258e08e3)。只出主运。
|
||||
|
||||
@@ -33,6 +33,9 @@ _EXALTED_SIGNS = {
|
||||
"Sun": {0}, "Moon": {1}, "Mars": {9}, "Mercury": {5},
|
||||
"Jupiter": {3}, "Venus": {11}, "Saturn": {6},
|
||||
}
|
||||
_AYUR_RASI_STRENGTH_BODIES = (
|
||||
"Sun", "Moon", "Mars", "Mercury", "Jupiter", "Venus", "Saturn", "Rahu", "Ketu",
|
||||
)
|
||||
|
||||
|
||||
def _sign_index(longitude: float) -> int:
|
||||
@@ -67,6 +70,8 @@ def select_niryaana_shoola_start_sign(
|
||||
|
||||
PVR's general rasi rules are expressly adapted for ayur dashas: all rasi
|
||||
aspects matter equally and the sign lord's aspect has no special weight.
|
||||
Both chaya grahas are included: PVR's rasi-drishti material has Rahu and
|
||||
Ketu aspect signs, and its longevity examples treat both as influences.
|
||||
The text does not provide a further longevity-specific tie-break, so a
|
||||
tie remains blocked instead of borrowing Narayana's lord rules.
|
||||
"""
|
||||
@@ -75,7 +80,7 @@ def select_niryaana_shoola_start_sign(
|
||||
positions = {
|
||||
name: float(longitude)
|
||||
for name, longitude in planet_longitudes.items()
|
||||
if isinstance(longitude, (int, float))
|
||||
if name in _AYUR_RASI_STRENGTH_BODIES and isinstance(longitude, (int, float))
|
||||
}
|
||||
candidates = {}
|
||||
for sign_index in (second, eighth):
|
||||
@@ -112,6 +117,7 @@ def select_niryaana_shoola_start_sign(
|
||||
)
|
||||
payload = {
|
||||
"profile": "pvr_niryaana_shoola_ayur_rasi_strength_v1",
|
||||
"included_bodies": list(_AYUR_RASI_STRENGTH_BODIES),
|
||||
"ascendant_sign_index": lagna,
|
||||
"second_sign_index": second,
|
||||
"eighth_sign_index": eighth,
|
||||
|
||||
@@ -42,6 +42,23 @@ def test_niryaana_shoola_uses_ayur_specific_rasi_strength() -> None:
|
||||
assert selection["candidates"][7]["rasi_aspecting_planets"] == ["Sun"]
|
||||
|
||||
|
||||
def test_niryaana_shoola_counts_both_nodes_and_no_non_classical_body() -> None:
|
||||
occupancy = select_niryaana_shoola_start_sign(
|
||||
ascendant_longitude=0.0,
|
||||
planet_longitudes={"Rahu": 31.0, "Ketu": 211.0, "Pluto": 31.0},
|
||||
)
|
||||
aspects = select_niryaana_shoola_start_sign(
|
||||
ascendant_longitude=0.0,
|
||||
planet_longitudes={"Rahu": 1.0, "Ketu": 181.0},
|
||||
)
|
||||
|
||||
assert occupancy["included_bodies"][-2:] == ["Rahu", "Ketu"]
|
||||
assert occupancy["candidates"][1]["occupants"] == ["Rahu"]
|
||||
assert occupancy["candidates"][7]["occupants"] == ["Ketu"]
|
||||
assert aspects["candidates"][1]["rasi_aspecting_planets"] == ["Ketu"]
|
||||
assert aspects["candidates"][7]["rasi_aspecting_planets"] == ["Rahu"]
|
||||
|
||||
|
||||
def test_niryaana_shoola_blocks_unresolved_ayur_rasi_strength_tie() -> None:
|
||||
selection = select_niryaana_shoola_start_sign(
|
||||
ascendant_longitude=0.0,
|
||||
|
||||
@@ -29,7 +29,7 @@ BUG-1283(10-09)把旧 `niryaana_shoola_dasha.py` 换成 `goel_nirayana_shool
|
||||
| H1 | Niryaana Shoola 采用占星师 10-18 的 PVR 口径(`pvr_niryaana_shoola_v1`)。**推翻 BUG-1283 选定的 `goel_nirayana_shoola_v1`**;BUG-1283 的另一半(旧 `niryaana_shoola_dasha.py` 不得被新路径调用)保持不变 |
|
||||
| H2 | Shoola 保持现状(上升 / 七宫取强、每宫 9 年)——那本来就是 Shoola 的规则 |
|
||||
| H3 | 合盘不用 Niryaana Shoola 做关系应期(与上游一致);本单只影响个人完整数据版报告和 full-reading 的 `niryaana_shoola_dasha` 键 |
|
||||
| H4 | **起运星座按上游 `9f08b57b` 的寿命类星座力量选**(`pvr_niryaana_shoola_ayur_rasi_strength_v1`,占星师 10-18 裁定,推翻本单上一版「用我们的 `stronger_sign`」与上游 `cba6a031` 的 Bhava Bala):比较第二宫与第八宫,依次看 ① 宫内行星数 ② 所有行星对它的 Jaimini 星座相位数(宫主不加权)③ 宫内有无入旺行星;三层都平手则「本轮不上表」并写明「二宫与八宫力量相同,原书没有给出进一步的裁决规则」,不得借用 Narayana 的宫主规则硬选。行星集合与上游一致(含罗睺、计都)。在 `rashi_dashas_native.py` 里按上游函数逐条实现,副本见 `docs/research/upstream_niryaana_shoola_9f08b57b/` |
|
||||
| H4 | **起运星座按上游 `9f08b57b` 的寿命类星座力量选**(`pvr_niryaana_shoola_ayur_rasi_strength_v1`,占星师 10-18 裁定,推翻本单上一版「用我们的 `stronger_sign`」与上游 `cba6a031` 的 Bhava Bala):比较第二宫与第八宫,依次看 ① 宫内行星数 ② 所有行星对它的 Jaimini 星座相位数(宫主不加权)③ 宫内有无入旺行星;三层都平手则「本轮不上表」并写明「二宫与八宫力量相同,原书没有给出进一步的裁决规则」,不得借用 Narayana 的宫主规则硬选。计数的行星**固定为九曜**:七曜 + 罗睺 + 计都(占星师 10-18 确认,依据 PVR 赋予两者星座相位、寿命章节视其为实际影响;上游 `258e08e3`);天王、海王、冥王与 Upagraha 不计,节点不加额外权重。在 `rashi_dashas_native.py` 里按上游函数逐条实现,副本见 `docs/research/upstream_niryaana_shoola_9f08b57b/` |
|
||||
| H5 | **只出主运,不出子运**(与上游一致:上游说明 PVR 没有独立给出子运规则,子运标为 blocked)。报告里该表只列主运并写一句「子运规则未定,暂不列出」 |
|
||||
|
||||
## 硬红线
|
||||
@@ -42,7 +42,7 @@ BUG-1283(10-09)把旧 `niryaana_shoola_dasha.py` 换成 `goel_nirayana_shool
|
||||
|
||||
| # | 内容 | 验收标准 |
|
||||
| --- | --- | --- |
|
||||
| T1 | `niryaana_shoola` 改为 PVR:第二宫与第八宫取强起运;起运星座奇数顺行、偶数逆行;动 / 固 / 双星座 7 / 8 / 9 年(12 宫一轮 96 年);**只出主运**(H5);profile 名 `pvr_niryaana_shoola_v1`,出处写 PVR《Vedic Astrology: An Integrated Approach》 | 新测试:① 同一张盘 Shoola 与 Niryaana Shoola 的首运或年数不再全同;② 白羊上升样例起运在金牛 / 天蝎中较强者;③ 奇偶方向各一例;④ 动 / 固 / 双年数各一例;⑤ 在上游测试样例上(样例直接给定二宫 / 八宫力量)与上游 `pvr_niryaana_shoola_v1` 的主运序列一致(把期望值抄过来作 golden,写明出处);⑥ 两位公开名人各一条,起运星座与主运序列必须与上游 `9f08b57b` 一致(Claude 10-18 实测:一张起射手、一张起水瓶);⑦ 构造一张三层都平手的盘,结果为「本轮不上表」 |
|
||||
| T1 | `niryaana_shoola` 改为 PVR:第二宫与第八宫取强起运;起运星座奇数顺行、偶数逆行;动 / 固 / 双星座 7 / 8 / 9 年(12 宫一轮 96 年);**只出主运**(H5);profile 名 `pvr_niryaana_shoola_v1`,出处写 PVR《Vedic Astrology: An Integrated Approach》 | 新测试:① 同一张盘 Shoola 与 Niryaana Shoola 的首运或年数不再全同;② 白羊上升样例起运在金牛 / 天蝎中较强者;③ 奇偶方向各一例;④ 动 / 固 / 双年数各一例;⑤ 在上游测试样例上(样例直接给定二宫 / 八宫力量)与上游 `pvr_niryaana_shoola_v1` 的主运序列一致(把期望值抄过来作 golden,写明出处);⑥ 两位公开名人各一条,起运星座与主运序列必须与上游 `9f08b57b` 一致(Claude 10-18 实测:一张起射手、一张起水瓶);⑦ 构造一张三层都平手的盘,结果为「本轮不上表」;⑧ 节点占宫与节点星座相位各一条(照上游 `258e08e3` 的测试);⑨ 传入外行星时不计数 |
|
||||
| T2 | full-reading 的 `niryaana_shoola_dasha` 键改用 T1 结果(替换 #81 的占位) | 上游合盘校验器读这一行仍为 `not_applicable`(合盘不用);个人报告节表显示新表 |
|
||||
| T3 | 记录:BUG_HISTORY(新编号,关联 BUG-1283,写明「推翻其所选 profile」)、CHANGELOG(报告里 Niryaana Shoola 大运表变了)、PROGRESS | 文档齐 |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user