Firdaria (LOG-11) — perska technika time-lord
- engine/firdaria.py: sekta (dzień = Słońce nad horyzontem, ta sama półkula osi Asc-Dsc co MC); kolejność diurnalna/nokturnalna; klasyczne długości okresów (Su10 Ve8 Me13 Mo9 Sa11 Ju12 Ma7 + NN3 + SN2 = 75 lat); okresy główne planet dzielone na 7 podokresów (sub-lord od władcy okresu), węzły bez sub. - endpoint /chart/firdaria. - oś czasu: firdaria_events — starty (pod)okresów w oknie; wpięte w build_timeline (domyślnie) + tokeny [major][sub] do dopięcia interpretacji (1B->2B). Walidacja: - sekta = day dla horoskopu referencyjnego (zgodnie z notes3 "Day birth"); night gdy Słońce po stronie IC; sumy i przyleganie okresów; podokresy 7x sumujące się do okresu; wiek 42 w okresie Saturna. - E2E: okresy Sun 1984-1994 ... Saturn 2024-2035; w osi czasu "Firdaria: Saturn / Mars" 2027 -> 223 interpretacje ([Sa+[Ma -> "injury"). - 78 testów przechodzi (nowy test_firdaria). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -109,6 +109,28 @@ def solar_return_events(engine, natal_moment, birth: datetime, lo: datetime, hi:
|
||||
return out
|
||||
|
||||
|
||||
def firdaria_events(natal_points: dict[str, float], birth: datetime, lo: datetime, hi: datetime) -> list[dict]:
|
||||
"""Starty okresów/podokresów Firdarii (LOG-11) nachodzące na okno."""
|
||||
from app.engine.firdaria import firdaria
|
||||
|
||||
fd = firdaria(birth, natal_points["Sun"], natal_points["Asc"], natal_points["MC"])
|
||||
out: list[dict] = []
|
||||
for period in fd["periods"]:
|
||||
if "sub" in period:
|
||||
for s in period["sub"]:
|
||||
if lo <= _as_dt(s["start"]) <= hi:
|
||||
row = _row("firdaria", f"Firdaria: {period['lord']} / {s['lord']}",
|
||||
s["start"], s["start"], s["end"])
|
||||
row.update(fd_major=period["lord"], fd_sub=s["lord"])
|
||||
out.append(row)
|
||||
elif lo <= _as_dt(period["start"]) <= hi: # węzeł — bez podokresów
|
||||
row = _row("firdaria", f"Firdaria: {period['lord']}",
|
||||
period["start"], period["start"], period["end"])
|
||||
row.update(fd_major=period["lord"])
|
||||
out.append(row)
|
||||
return out
|
||||
|
||||
|
||||
def _as_dt(d) -> datetime:
|
||||
if isinstance(d, datetime):
|
||||
return d if d.tzinfo else d.replace(tzinfo=timezone.utc)
|
||||
@@ -124,7 +146,7 @@ def build_timeline(
|
||||
"""Scala wybrane techniki w jedną oś czasu, posortowaną po dacie dokładnej."""
|
||||
lo, hi = _as_dt(from_d), _as_dt(to_d)
|
||||
birth = natal_moment.when_utc
|
||||
want = set(techniques or ["profection", "solar_return", "solar_arc"])
|
||||
want = set(techniques or ["profection", "solar_return", "solar_arc", "firdaria"])
|
||||
events: list[dict] = []
|
||||
if "profection" in want:
|
||||
events += profection_events(natal_points["Asc"], birth, lo, hi)
|
||||
@@ -132,5 +154,7 @@ def build_timeline(
|
||||
events += solar_return_events(engine, natal_moment, birth, lo, hi)
|
||||
if "solar_arc" in want:
|
||||
events += solar_arc_directions(natal_points, birth, lo, hi)
|
||||
if "firdaria" in want:
|
||||
events += firdaria_events(natal_points, birth, lo, hi)
|
||||
events.sort(key=lambda e: e["exact"])
|
||||
return events
|
||||
|
||||
Reference in New Issue
Block a user