fix: improve context-aware yoga precision
This commit is contained in:
@@ -78,9 +78,10 @@ PYJHORA_VARIANTS = {
|
||||
# Vahana variants
|
||||
'vahana_yoga_209': 'bvr_vahana_yoga',
|
||||
'vahana_yoga_210': 'bvr_vahana_yoga',
|
||||
# Kapata -> Nishkapata
|
||||
'kapata_yoga_202': 'bvr_nishkapata_precise',
|
||||
'kapata_yoga_204': 'bvr_nishkapata_precise',
|
||||
# Kapata family
|
||||
'kapata_yoga_202': 'bvr_kapata_yoga',
|
||||
'kapata_yoga_203': 'bvr_kapata_yoga',
|
||||
'kapata_yoga_204': 'bvr_kapata_yoga',
|
||||
'pisacha_grastha_yoga': 'bvr_pisacha_grastha_yoga',
|
||||
'kaalanirdesat_puthranaasa_yoga_229': 'bvr_kaalanirdesat_puthranaasa_yoga',
|
||||
'dwadasa_sahodara_yoga': 'bvr_dwadasa_sahodara_yoga',
|
||||
@@ -95,8 +96,11 @@ PYJHORA_VARIANTS = {
|
||||
'sula_yoga': 'bvr_soola_yoga',
|
||||
# Kedara
|
||||
'kedara_yoga': 'bvr_kedaara_yoga',
|
||||
# Kaahala/Kahala
|
||||
'kaahala_yoga': 'kahala_yoga',
|
||||
# Kaahala/Kahala are distinct PyJHora functions:
|
||||
# - kaahala_yoga: L4 and Jupiter in mutual quadrants + strong L1
|
||||
# - kahala_yoga: L4 and L9 in mutual kendras + strong L1
|
||||
'kaahala_yoga': 'bvr_kaahala_yoga',
|
||||
'kahala_yoga': 'kahala_yoga',
|
||||
# Direct mappings for common yogas
|
||||
'vosi_yoga': 'bvr_vosi_precise',
|
||||
'sunaphaa_yoga': 'bvr_sunaphaa_precise',
|
||||
|
||||
+11
-2
@@ -1327,12 +1327,21 @@ class YogaEngine:
|
||||
if ctype == "malefic_in_lagna_or_gulika_in_trine_OR_gulika_with_kendra_trine_lord_OR_l1_with_rahu_sat_ket":
|
||||
l1 = house_lord(1)
|
||||
gh = ctx.upagraha_house("gulika")
|
||||
# PyJHora: condition 3 stands alone; condition 1 requires BOTH malefic in Lagna AND Gulika in trine.
|
||||
l1_with_rahu_sat_ket = l1 and any(ctx.house_of(l1) == ctx.house_of(p) for p in ["Rahu", "Saturn", "Ketu"] if p in ctx.planets and p != l1)
|
||||
if l1_with_rahu_sat_ket:
|
||||
return success()
|
||||
if gh is None:
|
||||
return []
|
||||
malefic_in_lagna = any(ctx.house_of(p) == 1 for p in MALEFICS if p in ctx.planets)
|
||||
gulika_in_trine = gh in (1, 5, 9)
|
||||
if malefic_in_lagna and gulika_in_trine:
|
||||
return success()
|
||||
kendra_trine_lords = {house_lord(h) for h in (1, 4, 5, 7, 9, 10)}
|
||||
gulika_with_kendra_trine_lord = gh is not None and any(
|
||||
gulika_with_kendra_trine_lord = any(
|
||||
lord and lord in ctx.planets and ctx.house_of(lord) == gh for lord in kendra_trine_lords
|
||||
)
|
||||
return success() if any(ctx.house_of(p) == 1 for p in MALEFICS if p in ctx.planets) or gulika_in_trine or gulika_with_kendra_trine_lord or (l1 and any(related(l1, p) for p in ["Rahu", "Saturn", "Ketu"] if p in ctx.planets)) else []
|
||||
return success() if gulika_with_kendra_trine_lord else []
|
||||
if ctype == "same_lord_for_1st_and_4th":
|
||||
return success() if house_lord(1) == house_lord(4) else []
|
||||
if ctype == "1st_and_4th_lords_are_natural_or_temporal_friends":
|
||||
|
||||
Reference in New Issue
Block a user