fix(ephemeris): include nutation in the sidereal frame
恒星黄道改为与 Swiss Ephemeris FLG_SIDEREAL 同一套含章动岁差。 产品默认路径不再用平岁差去减含章动的视位置。上升和宫头用同一个岁差。 校正身份升到 rectification-v5-matrix-scoring-12。 BUG-1275。未推送,未部署。v5 先验头名三格下降 1.3 个百分点,不调参。
This commit is contained in:
@@ -132,3 +132,20 @@ def temporary_ayanamsa(name: Any = None, swe_module: Any = None) -> Iterator[str
|
||||
def sidereal_flags(swe_module: Any, ayanamsa_name: Any = None) -> int:
|
||||
apply_ayanamsa(ayanamsa_name, swe_module)
|
||||
return getattr(swe_module, 'FLG_SWIEPH', 2) | getattr(swe_module, 'FLG_SIDEREAL', 65536)
|
||||
|
||||
|
||||
def sidereal_ayanamsa_degrees(jd_ut: float, swe_module: Any = None, flags: int | None = None) -> float:
|
||||
"""Ayanamsa that FLG_SIDEREAL subtracts for these flags.
|
||||
|
||||
``get_ayanamsa`` and ``get_ayanamsa_ut`` omit nutation. Apparent tropical
|
||||
positions include it, so that subtraction shifts every longitude by Δψ.
|
||||
"""
|
||||
module = swe_module or swe
|
||||
if module is None:
|
||||
raise RuntimeError("swisseph is not available")
|
||||
if flags is None:
|
||||
flags = getattr(module, "FLG_SWIEPH", 2)
|
||||
raw = module.get_ayanamsa_ex_ut(float(jd_ut), int(flags))
|
||||
if isinstance(raw, (tuple, list)):
|
||||
return float(raw[1])
|
||||
return float(raw)
|
||||
|
||||
Reference in New Issue
Block a user