Release v6.0.44 fix JD timezone bug in reference data

- Fix: _compute_one_chart.py JD calculation used PyJHora's
  gregorian_to_jd() which ALWAYS returns noon JD regardless of time.
  Changed to swe.julday() with correct UTC hour.
- Impact: All 60 test charts with non-noon birth times had wrong
  ascendants and house assignments (e.g. Einstein went from
  Scorpio Asc -> Gemini Asc, matching Swiss Ephemeris)
- Cross-validated: Swiss Ephemeris (industry gold standard) and
  xalen-ephemeris (Rust, 5M chart oracle test)
- New baseline: F1=93.50% (Precision=93.82%, Recall=93.18%)
- Regenerated: standard_test_charts.json, planet_positions_60.json,
  validation_logic_report.json
- Quality gate: compile/json/audit/BPHS/pytest/golden all passed
This commit is contained in:
732642856
2026-06-06 14:43:11 +08:00
parent 26835f80b8
commit 0003d0be88
6 changed files with 11430 additions and 11649 deletions
+34 -1
View File
@@ -1,6 +1,39 @@
# 印度占星 Skill 更新日志 # 印度占星 Skill 更新日志
## v6.0.432026-06-06)—— Yoga F1 93.76%,引擎条件扩展 + PyJHora 源码 Bug 修复 ## v6.0.442026-06-06)—— 修复参考数据 JD 时区 Bug,验证基线校正
> **目标**:修复导致 `standard_test_charts.json` 中所有非正午出生星盘上升星座错误的 JD 时区 Bug。
> **新基线**F1 93.50%Precision=93.82%, Recall=93.18%
### 关键 Bug 修复
- **JD 时区 Bug**`_compute_one_chart.py:93`):PyJHora 的 `gregorian_to_jd()` 总是返回正午的 JD,完全忽略时间参数。改用 `swe.julday()` + UTC 时间计算正确 JD。
- 受影响:所有 `standard_test_charts.json` 中出生时间非 UTC 正午的星盘
- 修复效果示例(爱因斯坦):上升从天蝎座 2° → 双子座 0.65°,与 Swiss Ephemeris 同星座
- 交叉验证:Swiss Ephemeris(行业金标准)+ xalen-ephemerisRust500 万图表 oracle 测试)确认引擎计算正确
### 验证指标变化
| 指标 | v6.0.43(错误基线) | v6.0.44(正确基线) | 变化说明 |
|---|---|---|---|
| F1 | 93.76% | **93.50%** | 下降因参考数据修正,非引擎退化 |
| Precision | 95.69% | 93.82% | FP 44→63 |
| Recall | 91.91% | **93.18%** | FN 86→70 ↑ |
| Agreements | 977 | 957 | 巧合一致减少 |
### 参考数据维护
- 重新生成 `standard_test_charts.json`(60 盘,基于已修复的 JD 计算)
- 重新生成 `planet_positions_60.json`
- 更新 `validation_logic_report.json`
### 质量门禁
```
compile: 10 files ok
json: 5 files valid
capability audit: valid, 0 problems
BPHS invariants: 18/18 passed
pytest: 35 passed
golden case: passed
Quality gate passed
```
> **目标**:修复 PyJHora 源码中的 3 个 Bug,扩展 yoga_engine 语义条件类型,实现 kalaanidhi 和 krisanga 的源码口径对齐。 > **目标**:修复 PyJHora 源码中的 3 个 Bug,扩展 yoga_engine 语义条件类型,实现 kalaanidhi 和 krisanga 的源码口径对齐。
> **指标**F1 93.28% → **93.76%**FN 96→86FP 44→44(不变) > **指标**F1 93.28% → **93.76%**FN 96→86FP 44→44(不变)
+10 -9
View File
@@ -10,19 +10,20 @@ description: 印度占星(Jyotish)专业解盘与推运系统。核心能力
> **严格路由**`references/strict-workflow-router.md`(⭐涉及事业/婚恋/财务/应期/技法验证时必须优先读取) > **严格路由**`references/strict-workflow-router.md`(⭐涉及事业/婚恋/财务/应期/技法验证时必须优先读取)
> **覆盖矩阵**`references/technique-capability-matrix.md`(⭐判断技法 covered/partial/missing 时必须参考) > **覆盖矩阵**`references/technique-capability-matrix.md`(⭐判断技法 covered/partial/missing 时必须参考)
> **机器注册表**`references/technique_registry.json` + `scripts/audit_capabilities.py`(⭐用于自动审计与CI门禁) > **机器注册表**`references/technique_registry.json` + `scripts/audit_capabilities.py`(⭐用于自动审计与CI门禁)
> **版本**v6.0.43-yoga-f1-94 | **详细变更**`CHANGELOG.md` > **版本**v6.0.44 | **详细变更**`CHANGELOG.md`
## Yoga 逻辑验证指标 ## Yoga 逻辑验证指标
| 指标 | v6.0.42 | v6.0.43 | | 指标 | v6.0.43(旧基线) | v6.0.44(正确基线) |
|---|---|---| |---|---|---|
| Precision | 95.67% | **95.69%** | | Precision | 95.69% | **93.82%** |
| Recall | 91.01% | **91.91%** | | Recall | 91.91% | **93.18%** |
| **F1 Score** | **93.28%** | **93.76%** | | **F1 Score** | **93.76%** | **93.50%** |
| FP | 44 | **44** | | FP | 44 | **63** |
| FN | 96 | **86** | | FN | 86 | **70** |
| Charts Tested | 60 | 60 |
| Comparable Rules | 72 | 72 | > ⚠️ v6.0.44 修正了参考数据的 JD 时区 Bug,指标变化反映的是从错误基线切换到正确基线,非引擎退化。
> 详细说明见 `CHANGELOG.md`。
--- ---
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -25,6 +25,7 @@ try:
from jhora.panchanga import drik from jhora.panchanga import drik
from jhora.panchanga.drik import Place from jhora.panchanga.drik import Place
import jhora.utils as utils import jhora.utils as utils
import swisseph as swe
PYJHORA_OK = True PYJHORA_OK = True
except Exception as e: except Exception as e:
PYJHORA_OK = False PYJHORA_OK = False
@@ -85,12 +86,13 @@ def compute_yogas(chart):
tz = tz_to_float(chart["tz"]) tz = tz_to_float(chart["tz"])
place = Place(chart["city"], chart["lat"], chart["lon"], tz) place = Place(chart["city"], chart["lat"], chart["lon"], tz)
# 构造datetime并转JD # 构造datetime,转正确UTC JD(修复:PyJHora的gregorian_to_jd返回正午JD,无视时间)
date_str = chart["date"] + " " + chart["time"] date_str = chart["date"] + " " + chart["time"]
if date_str.count(':') == 1: if date_str.count(':') == 1:
date_str += ":00" date_str += ":00"
dt = datetime.datetime.strptime(date_str, "%Y-%m-%d %H:%M:%S") dt = datetime.datetime.strptime(date_str, "%Y-%m-%d %H:%M:%S")
jd = utils.gregorian_to_jd(dt) utc_hour = dt.hour - tz + dt.minute / 60.0 + dt.second / 3600.0
jd = swe.julday(dt.year, dt.month, dt.day, utc_hour)
dob = drik.Date(dt.year, dt.month, dt.day) dob = drik.Date(dt.year, dt.month, dt.day)
tob = (dt.hour, dt.minute, dt.second) tob = (dt.hour, dt.minute, dt.second)