kerykeion 4.12.3__py3-none-any.whl → 4.18.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kerykeion might be problematic. Click here for more details.
- kerykeion/__init__.py +3 -1
- kerykeion/aspects/aspects_utils.py +40 -123
- kerykeion/aspects/natal_aspects.py +34 -25
- kerykeion/aspects/synastry_aspects.py +34 -28
- kerykeion/astrological_subject.py +199 -196
- kerykeion/charts/charts_utils.py +701 -62
- kerykeion/charts/draw_planets.py +407 -0
- kerykeion/charts/kerykeion_chart_svg.py +534 -1140
- kerykeion/charts/templates/aspect_grid_only.xml +452 -0
- kerykeion/charts/templates/chart.xml +88 -70
- kerykeion/charts/templates/wheel_only.xml +499 -0
- kerykeion/charts/themes/classic.css +82 -0
- kerykeion/charts/themes/dark-high-contrast.css +121 -0
- kerykeion/charts/themes/dark.css +121 -0
- kerykeion/charts/themes/light.css +117 -0
- kerykeion/enums.py +1 -0
- kerykeion/ephemeris_data.py +178 -0
- kerykeion/fetch_geonames.py +2 -3
- kerykeion/kr_types/chart_types.py +6 -16
- kerykeion/kr_types/kr_literals.py +12 -3
- kerykeion/kr_types/kr_models.py +77 -32
- kerykeion/kr_types/settings_models.py +4 -10
- kerykeion/relationship_score/__init__.py +2 -0
- kerykeion/relationship_score/relationship_score.py +175 -0
- kerykeion/relationship_score/relationship_score_factory.py +275 -0
- kerykeion/report.py +6 -3
- kerykeion/settings/kerykeion_settings.py +6 -1
- kerykeion/settings/kr.config.json +256 -102
- kerykeion/utilities.py +122 -217
- {kerykeion-4.12.3.dist-info → kerykeion-4.18.0.dist-info}/METADATA +40 -10
- kerykeion-4.18.0.dist-info/RECORD +42 -0
- kerykeion/relationship_score.py +0 -205
- kerykeion-4.12.3.dist-info/RECORD +0 -32
- {kerykeion-4.12.3.dist-info → kerykeion-4.18.0.dist-info}/LICENSE +0 -0
- {kerykeion-4.12.3.dist-info → kerykeion-4.18.0.dist-info}/WHEEL +0 -0
- {kerykeion-4.12.3.dist-info → kerykeion-4.18.0.dist-info}/entry_points.txt +0 -0
|
@@ -6,17 +6,11 @@ class ChartTemplateDictionary(TypedDict):
|
|
|
6
6
|
degreeRing: str
|
|
7
7
|
first_circle: str
|
|
8
8
|
second_circle: str
|
|
9
|
-
|
|
10
|
-
c3style: str
|
|
9
|
+
third_circle: str
|
|
11
10
|
makeAspects: str
|
|
12
11
|
makeAspectGrid: str
|
|
13
|
-
makePatterns: str
|
|
14
12
|
chart_height: float
|
|
15
13
|
chart_width: float
|
|
16
|
-
circleX: str
|
|
17
|
-
circleY: str
|
|
18
|
-
svgWidth: str
|
|
19
|
-
svgHeight: str
|
|
20
14
|
viewbox: str
|
|
21
15
|
stringTitle: str
|
|
22
16
|
stringName: str
|
|
@@ -25,12 +19,7 @@ class ChartTemplateDictionary(TypedDict):
|
|
|
25
19
|
bottomLeft2: str
|
|
26
20
|
bottomLeft3: str
|
|
27
21
|
bottomLeft4: str
|
|
28
|
-
|
|
29
|
-
lunar_phase_bg: str
|
|
30
|
-
lunar_phase_cx: int
|
|
31
|
-
lunar_phase_r: int
|
|
32
|
-
lunar_phase_outline: str
|
|
33
|
-
lunar_phase_rotate: float
|
|
22
|
+
moon_phase: str
|
|
34
23
|
stringLocation: str
|
|
35
24
|
stringDateTime: str
|
|
36
25
|
stringLat: str
|
|
@@ -42,7 +31,7 @@ class ChartTemplateDictionary(TypedDict):
|
|
|
42
31
|
# Background color of the chart
|
|
43
32
|
paper_color_1: str
|
|
44
33
|
|
|
45
|
-
# Planets colors, from
|
|
34
|
+
# Planets colors, from 0 to 16 (0 is the Sun)
|
|
46
35
|
planets_color_0: str
|
|
47
36
|
planets_color_1: str
|
|
48
37
|
planets_color_2: str
|
|
@@ -59,6 +48,7 @@ class ChartTemplateDictionary(TypedDict):
|
|
|
59
48
|
planets_color_13: str
|
|
60
49
|
planets_color_14: str
|
|
61
50
|
planets_color_15: str
|
|
51
|
+
planets_color_16: str
|
|
62
52
|
|
|
63
53
|
# Zodiac colors, from 0 to 11 (0 is Aries)
|
|
64
54
|
zodiac_color_0: str
|
|
@@ -87,8 +77,6 @@ class ChartTemplateDictionary(TypedDict):
|
|
|
87
77
|
orb_color_150: str
|
|
88
78
|
orb_color_180: str
|
|
89
79
|
|
|
90
|
-
cfgZoom: str
|
|
91
|
-
cfgRotate: str
|
|
92
80
|
cfgTranslate: str
|
|
93
81
|
makeZodiac: str
|
|
94
82
|
makeHouses: str
|
|
@@ -96,3 +84,5 @@ class ChartTemplateDictionary(TypedDict):
|
|
|
96
84
|
elements_percentages: str
|
|
97
85
|
makePlanetGrid: str
|
|
98
86
|
makeHousesGrid: str
|
|
87
|
+
|
|
88
|
+
color_style_tag: str
|
|
@@ -14,7 +14,7 @@ Sign = Literal["Ari", "Tau", "Gem", "Can", "Leo", "Vir", "Lib", "Sco", "Sag", "C
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
SignNumbers = Literal[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
|
17
|
-
"""Literal type for Zodiac Sign Numbers, the signs are numbered in order starting from Aries (0) to
|
|
17
|
+
"""Literal type for Zodiac Sign Numbers, the signs are numbered in order starting from Aries (0) to Pis (11)"""
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
Houses = Literal["First_House", "Second_House", "Third_House", "Fourth_House", "Fifth_House", "Sixth_House", "Seventh_House", "Eighth_House", "Ninth_House", "Tenth_House", "Eleventh_House", "Twelfth_House"]
|
|
@@ -25,7 +25,7 @@ HouseNumbers = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
|
|
|
25
25
|
"""Literal type for House Numbers, starting from the First House (1) to the Twelfth House (12)"""
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
Planet = Literal["Sun", "Moon", "Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto", "Mean_Node", "True_Node", "Chiron"]
|
|
28
|
+
Planet = Literal["Sun", "Moon", "Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto", "Mean_Node", "True_Node", "Chiron", "Mean_Lilith"]
|
|
29
29
|
"""Literal type for Planets"""
|
|
30
30
|
|
|
31
31
|
|
|
@@ -98,4 +98,13 @@ Literal type for perspective types.
|
|
|
98
98
|
- "True Geocentric": Earth-centered, true positions.
|
|
99
99
|
|
|
100
100
|
Usually the standard is "Apparent Geocentric"
|
|
101
|
-
"""
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
SignsEmoji = Literal["♈️", "♉️", "♊️", "♋️", "♌️", "♍️", "♎️", "♏️", "♐️", "♑️", "♒️", "♓️"]
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
KerykeionChartTheme = Literal["light", "dark", "dark-high-contrast", "classic"]
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
RelationshipScoreDescription = Literal["Minimal", "Medium", "Important", "Very Important", "Exceptional", "Rare Exceptional"]
|
kerykeion/kr_types/kr_models.py
CHANGED
|
@@ -7,12 +7,30 @@
|
|
|
7
7
|
from typing import Union, Optional
|
|
8
8
|
from pydantic import BaseModel
|
|
9
9
|
|
|
10
|
-
from kerykeion.kr_types import
|
|
10
|
+
from kerykeion.kr_types import (
|
|
11
|
+
LunarPhaseEmoji,
|
|
12
|
+
LunarPhaseName,
|
|
13
|
+
Planet,
|
|
14
|
+
Houses,
|
|
15
|
+
Quality,
|
|
16
|
+
Element,
|
|
17
|
+
Sign,
|
|
18
|
+
ZodiacType,
|
|
19
|
+
SignNumbers,
|
|
20
|
+
PointType,
|
|
21
|
+
SiderealMode,
|
|
22
|
+
HousesSystemIdentifier,
|
|
23
|
+
Houses,
|
|
24
|
+
SignsEmoji,
|
|
25
|
+
RelationshipScoreDescription
|
|
26
|
+
)
|
|
27
|
+
|
|
11
28
|
|
|
12
29
|
class SubscriptableBaseModel(BaseModel):
|
|
13
30
|
"""
|
|
14
31
|
Pydantic BaseModel with subscriptable support, so you can access the fields as if they were a dictionary.
|
|
15
32
|
"""
|
|
33
|
+
|
|
16
34
|
def __getitem__(self, key):
|
|
17
35
|
return getattr(self, key)
|
|
18
36
|
|
|
@@ -22,9 +40,10 @@ class SubscriptableBaseModel(BaseModel):
|
|
|
22
40
|
def __delitem__(self, key):
|
|
23
41
|
delattr(self, key)
|
|
24
42
|
|
|
25
|
-
def get(self, key, default):
|
|
43
|
+
def get(self, key, default = None):
|
|
26
44
|
return getattr(self, key, default)
|
|
27
45
|
|
|
46
|
+
|
|
28
47
|
class LunarPhaseModel(SubscriptableBaseModel):
|
|
29
48
|
degrees_between_s_m: Union[float, int]
|
|
30
49
|
moon_phase: int
|
|
@@ -47,7 +66,7 @@ class KerykeionPointModel(SubscriptableBaseModel):
|
|
|
47
66
|
abs_pos: float
|
|
48
67
|
emoji: str
|
|
49
68
|
point_type: PointType
|
|
50
|
-
house: Optional[
|
|
69
|
+
house: Optional[Houses] = None
|
|
51
70
|
retrograde: Optional[bool] = None
|
|
52
71
|
|
|
53
72
|
|
|
@@ -73,6 +92,11 @@ class AstrologicalSubjectModel(SubscriptableBaseModel):
|
|
|
73
92
|
iso_formatted_utc_datetime: str
|
|
74
93
|
julian_day: float
|
|
75
94
|
|
|
95
|
+
# Deprecated properties -->
|
|
96
|
+
utc_time: float
|
|
97
|
+
local_time: float
|
|
98
|
+
# <-- Deprecated properties
|
|
99
|
+
|
|
76
100
|
# Planets
|
|
77
101
|
sun: KerykeionPointModel
|
|
78
102
|
moon: KerykeionPointModel
|
|
@@ -87,6 +111,7 @@ class AstrologicalSubjectModel(SubscriptableBaseModel):
|
|
|
87
111
|
|
|
88
112
|
# Optional Planets:
|
|
89
113
|
chiron: Union[KerykeionPointModel, None]
|
|
114
|
+
mean_lilith: Union[KerykeionPointModel, None]
|
|
90
115
|
|
|
91
116
|
# Houses
|
|
92
117
|
first_house: KerykeionPointModel
|
|
@@ -106,35 +131,55 @@ class AstrologicalSubjectModel(SubscriptableBaseModel):
|
|
|
106
131
|
mean_node: KerykeionPointModel
|
|
107
132
|
true_node: KerykeionPointModel
|
|
108
133
|
|
|
109
|
-
# Lunar Phase
|
|
110
134
|
lunar_phase: LunarPhaseModel
|
|
135
|
+
"""Lunar phase model"""
|
|
136
|
+
|
|
137
|
+
planets_names_list: list[Planet]
|
|
138
|
+
"""Ordered list of available planets names"""
|
|
139
|
+
|
|
140
|
+
houses_names_list: list[Houses]
|
|
141
|
+
"""Ordered list of houses names"""
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class EphemerisDictModel(SubscriptableBaseModel):
|
|
145
|
+
date: str
|
|
146
|
+
planets: list[KerykeionPointModel]
|
|
147
|
+
houses: list[KerykeionPointModel]
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
class AspectModel(SubscriptableBaseModel):
|
|
151
|
+
p1_name: str
|
|
152
|
+
p1_abs_pos: float
|
|
153
|
+
p2_name: str
|
|
154
|
+
p2_abs_pos: float
|
|
155
|
+
aspect: str
|
|
156
|
+
orbit: float
|
|
157
|
+
aspect_degrees: int
|
|
158
|
+
aid: int
|
|
159
|
+
diff: float
|
|
160
|
+
p1: int
|
|
161
|
+
p2: int
|
|
162
|
+
is_major: bool
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class ZodiacSignModel(SubscriptableBaseModel):
|
|
166
|
+
sign: Sign
|
|
167
|
+
quality: Quality
|
|
168
|
+
element: Element
|
|
169
|
+
emoji: SignsEmoji
|
|
170
|
+
sign_num: SignNumbers
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class RelationshipScoreAspectModel(SubscriptableBaseModel):
|
|
174
|
+
p1_name: str
|
|
175
|
+
p2_name: str
|
|
176
|
+
aspect: str
|
|
177
|
+
orbit: float
|
|
111
178
|
|
|
112
|
-
# Deprecated properties
|
|
113
|
-
utc_time: float
|
|
114
|
-
local_time: float
|
|
115
179
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
if __name__ == "__main__":
|
|
123
|
-
from kerykeion.utilities import setup_logging
|
|
124
|
-
|
|
125
|
-
setup_logging(level="debug")
|
|
126
|
-
|
|
127
|
-
sun = KerykeionPointModel(
|
|
128
|
-
name="Sun",
|
|
129
|
-
element="Air",
|
|
130
|
-
quality="Fixed",
|
|
131
|
-
sign="Aqu",
|
|
132
|
-
sign_num=1,
|
|
133
|
-
position=0,
|
|
134
|
-
abs_pos=12.123123,
|
|
135
|
-
emoji="♈",
|
|
136
|
-
point_type="Planet",
|
|
137
|
-
)
|
|
138
|
-
|
|
139
|
-
print(sun.model_dump_json())
|
|
140
|
-
print(sun)
|
|
180
|
+
class RelationshipScoreModel(SubscriptableBaseModel):
|
|
181
|
+
score_value: int
|
|
182
|
+
score_description: RelationshipScoreDescription
|
|
183
|
+
is_destiny_sign: bool
|
|
184
|
+
aspects: list[RelationshipScoreAspectModel]
|
|
185
|
+
subjects: list[AstrologicalSubjectModel]
|
|
@@ -64,9 +64,10 @@ class KerykeionSettingsChartColorsModel(SubscriptableBaseModel):
|
|
|
64
64
|
zodiac_transit_ring_3: str = Field(title="Zodiac Transit Ring Color 3", description="Zodiac Transit Ring Color 3")
|
|
65
65
|
houses_radix_line: str = Field(title="Houses Radix Line Color", description="Houses Radix Line Color")
|
|
66
66
|
houses_transit_line: str = Field(title="Houses Transit Line Color", description="Houses Transit Line Color")
|
|
67
|
+
|
|
68
|
+
# Deprecated: Not used anymore
|
|
67
69
|
lunar_phase_0: str = Field(title="Lunar Phase Color 0", description="Lunar Phase Color 0")
|
|
68
70
|
lunar_phase_1: str = Field(title="Lunar Phase Color 1", description="Lunar Phase Color 1")
|
|
69
|
-
lunar_phase_2: str = Field(title="Lunar Phase Color 2", description="Lunar Phase Color 2")
|
|
70
71
|
|
|
71
72
|
|
|
72
73
|
# Aspect Settings
|
|
@@ -78,9 +79,7 @@ class KerykeionSettingsAspectModel(SubscriptableBaseModel):
|
|
|
78
79
|
degree: int = Field(title="Aspect Degrees", description="The degree of the aspect")
|
|
79
80
|
name: str = Field(title="Aspect Name", description="The name of the aspect")
|
|
80
81
|
is_active: bool = Field(title="Aspect is Active", description="Is the aspect active?")
|
|
81
|
-
visible_grid: bool = Field(title="Aspect Visible Grid", description="Is the aspect visible in the grid?")
|
|
82
82
|
is_major: bool = Field(title="Aspect is Major", description="Is the aspect major?")
|
|
83
|
-
is_minor: bool = Field(title="Aspect is Minor", description="Is the aspect minor?")
|
|
84
83
|
orb: int = Field(title="Aspect Orb", description="The orb of the aspect")
|
|
85
84
|
color: str = Field(title="Aspect Color", description="The color of the aspect")
|
|
86
85
|
|
|
@@ -109,6 +108,7 @@ class KerykeionLanguageCelestialPointModel(SubscriptableBaseModel):
|
|
|
109
108
|
Mc: str = Field(title="Medium Coeli", description="The name of Medium Coeli in the chart, in the language")
|
|
110
109
|
Dsc: str = Field(title="Descendant", description="The name of Descendant in the chart, in the language")
|
|
111
110
|
Ic: str = Field(title="Imum Coeli", description="The name of Imum Coeli in the chart, in the language")
|
|
111
|
+
Mean_Lilith: str = Field(title="Mean Lilith", description="The name of Mean Lilith in the chart, in the language")
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
class KerykeionLanguageModel(SubscriptableBaseModel):
|
|
@@ -142,12 +142,7 @@ class KerykeionLanguageModel(SubscriptableBaseModel):
|
|
|
142
142
|
|
|
143
143
|
class KerykeionGeneralSettingsModel(SubscriptableBaseModel):
|
|
144
144
|
axes_orbit: int = Field(title="Axes Orbit", description="The orbit of the axes in the chart")
|
|
145
|
-
planet_in_zodiac_extra_points: int = Field(title="Planet in Zodiac Extra Points", description="The extra points of the planet in the zodiac")
|
|
146
|
-
language: str = Field(title="Language", description="The language of the chart")
|
|
147
145
|
|
|
148
|
-
class KerykeionChartSettingsModel(SubscriptableBaseModel):
|
|
149
|
-
basic_chart_viewBox: str = Field(title="Basic Chart ViewBox", description="The viewbox of the basic chart")
|
|
150
|
-
wide_chart_viewBox: str = Field(title="Wide Chart ViewBox", description="The viewbox of the wide chart")
|
|
151
146
|
|
|
152
147
|
# Settings Model
|
|
153
148
|
class KerykeionSettingsModel(SubscriptableBaseModel):
|
|
@@ -159,5 +154,4 @@ class KerykeionSettingsModel(SubscriptableBaseModel):
|
|
|
159
154
|
celestial_points: List[KerykeionSettingsCelestialPointModel] = Field(title="Celestial Points", description="The list of the celestial points of the chart")
|
|
160
155
|
aspects: List[KerykeionSettingsAspectModel] = Field(title="Aspects", description="The list of the aspects of the chart")
|
|
161
156
|
language_settings: dict[str, KerykeionLanguageModel] = Field(title="Language Settings", description="The language settings of the chart")
|
|
162
|
-
general_settings: KerykeionGeneralSettingsModel = Field(title="General Settings", description="The general settings of the chart")
|
|
163
|
-
chart_settings: KerykeionChartSettingsModel = Field(title="Chart Settings", description="The chart settings of the chart")
|
|
157
|
+
general_settings: KerykeionGeneralSettingsModel = Field(title="General Settings", description="The general settings of the chart")
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
This is part of Kerykeion (C) 2024 Giacomo Battaglia
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from kerykeion import AstrologicalSubject
|
|
7
|
+
from kerykeion.aspects.synastry_aspects import SynastryAspects
|
|
8
|
+
import logging
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from typing import Union
|
|
11
|
+
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
|
|
12
|
+
import warnings
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class RelationshipScore:
|
|
16
|
+
"""
|
|
17
|
+
Calculates the relevance of the relationship between two subjects using the Ciro Discepolo method.
|
|
18
|
+
|
|
19
|
+
Results:
|
|
20
|
+
- 0 to 5: Minimal relationship
|
|
21
|
+
- 5 to 10: Medium relationship
|
|
22
|
+
- 10 to 15: Important relationship
|
|
23
|
+
- 15 to 20: Very important relationship
|
|
24
|
+
- 20 and 35: Exceptional relationship
|
|
25
|
+
- 35 and above: Rare Exceptional relationship
|
|
26
|
+
|
|
27
|
+
Documentation: http://www.cirodiscepolo.it/Articoli/Discepoloele.htm
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
first_subject (AstrologicalSubject): First subject instance
|
|
31
|
+
second_subject (AstrologicalSubject): Second subject instance
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
def __init__(
|
|
35
|
+
self,
|
|
36
|
+
first_subject: Union[AstrologicalSubject, AstrologicalSubjectModel],
|
|
37
|
+
second_subject: Union[AstrologicalSubject, AstrologicalSubjectModel],
|
|
38
|
+
new_settings_file: Union[Path, None] = None,
|
|
39
|
+
):
|
|
40
|
+
warnings.warn(
|
|
41
|
+
"The RelationshipScore class is deprecated and will be removed in a future version. Use RelationshipScoreFactory instead.",
|
|
42
|
+
DeprecationWarning,
|
|
43
|
+
stacklevel=2
|
|
44
|
+
)
|
|
45
|
+
self.first_subject = first_subject
|
|
46
|
+
self.second_subject = second_subject
|
|
47
|
+
self.score = 0
|
|
48
|
+
self.is_destiny_sign = False
|
|
49
|
+
self.relevant_aspects: list = []
|
|
50
|
+
self.relevant_default_aspects: list = []
|
|
51
|
+
self.__all_synastry_aspects = SynastryAspects(first_subject, second_subject, new_settings_file=new_settings_file).all_aspects
|
|
52
|
+
|
|
53
|
+
# Calculate all aspects at initialization
|
|
54
|
+
self._calculate_all()
|
|
55
|
+
|
|
56
|
+
def __str__(self) -> str:
|
|
57
|
+
return f"CoupleScoreInstance: {self.first_subject.name} and {self.second_subject.name}, score: {self.score}"
|
|
58
|
+
|
|
59
|
+
def __dict__(self) -> dict: # type: ignore
|
|
60
|
+
return {
|
|
61
|
+
"first_subject_name": self.first_subject.name,
|
|
62
|
+
"second_subject_name": self.second_subject.name,
|
|
63
|
+
"score": self.score,
|
|
64
|
+
"relevant_aspects": self.relevant_aspects,
|
|
65
|
+
"relevant_default_aspects": self.relevant_default_aspects,
|
|
66
|
+
"is_destiny_sign": self.is_destiny_sign,
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
def _log_aspect(self, aspect: dict, points: int) -> None:
|
|
70
|
+
logging.debug(f"{points} Points: {aspect['p1_name']} {aspect['aspect']} {aspect['p2_name']}, rounded orbit: {int(aspect['orbit'])}")
|
|
71
|
+
|
|
72
|
+
def _evaluate_destiny_sign(self) -> int:
|
|
73
|
+
"""
|
|
74
|
+
Adds 5 points if the subjects share the same sun sign quality.
|
|
75
|
+
"""
|
|
76
|
+
if self.first_subject.sun["quality"] == self.second_subject.sun["quality"]:
|
|
77
|
+
logging.debug(f'5 points: Destiny sign, {self.first_subject.sun["sign"]} and {self.second_subject.sun["sign"]}')
|
|
78
|
+
self.is_destiny_sign = True
|
|
79
|
+
return 5
|
|
80
|
+
return 0
|
|
81
|
+
|
|
82
|
+
def _check_if_sun_sun_aspect(self, aspect: dict) -> int:
|
|
83
|
+
"""
|
|
84
|
+
Adds points for Sun-Sun aspects:
|
|
85
|
+
- 8 points for conjunction/opposition/square
|
|
86
|
+
- 11 points if the aspect's orbit is <= 2 degrees
|
|
87
|
+
"""
|
|
88
|
+
aspect_types = ["conjunction", "opposition", "square"]
|
|
89
|
+
|
|
90
|
+
if aspect["p1_name"] == "Sun" and aspect["p2_name"] == "Sun" and aspect["aspect"] in aspect_types:
|
|
91
|
+
self.relevant_default_aspects.append(aspect)
|
|
92
|
+
score = 11 if aspect["orbit"] <= 2 else 8
|
|
93
|
+
|
|
94
|
+
self._log_aspect(aspect, score)
|
|
95
|
+
self.relevant_aspects.append(self._create_aspects_dictionary(aspect, score))
|
|
96
|
+
|
|
97
|
+
return score
|
|
98
|
+
return 0
|
|
99
|
+
|
|
100
|
+
def _check_if_sun_moon_conjunction(self, aspect: dict) -> int:
|
|
101
|
+
"""
|
|
102
|
+
Adds points for Sun-Moon conjunction:
|
|
103
|
+
- 8 points for conjunction
|
|
104
|
+
- 11 points if the aspect's orbit is <= 2 degrees
|
|
105
|
+
"""
|
|
106
|
+
planets = {"Moon", "Sun"}
|
|
107
|
+
|
|
108
|
+
if {aspect["p1_name"], aspect["p2_name"]} == planets and aspect["aspect"] == "conjunction":
|
|
109
|
+
self.relevant_default_aspects.append(aspect)
|
|
110
|
+
score = 11 if aspect["orbit"] <= 2 else 8
|
|
111
|
+
|
|
112
|
+
self._log_aspect(aspect, score)
|
|
113
|
+
self.relevant_aspects.append(self._create_aspects_dictionary(aspect, score))
|
|
114
|
+
|
|
115
|
+
return score
|
|
116
|
+
return 0
|
|
117
|
+
|
|
118
|
+
def _check_if_sun_moon_asc_aspect(self, aspect: dict) -> int:
|
|
119
|
+
"""
|
|
120
|
+
Adds 4 points for aspects involving Sun, Moon, and Ascendant.
|
|
121
|
+
"""
|
|
122
|
+
planets = ["Sun", "Moon", "First_House"]
|
|
123
|
+
|
|
124
|
+
if self._check_if_sun_sun_aspect(aspect) or self._check_if_sun_moon_conjunction(aspect):
|
|
125
|
+
return 0
|
|
126
|
+
|
|
127
|
+
if aspect["p1_name"] in planets and aspect["p2_name"] in planets:
|
|
128
|
+
self.relevant_default_aspects.append(aspect)
|
|
129
|
+
score = 4
|
|
130
|
+
|
|
131
|
+
self._log_aspect(aspect, score)
|
|
132
|
+
self.relevant_aspects.append(self._create_aspects_dictionary(aspect, score))
|
|
133
|
+
|
|
134
|
+
return score
|
|
135
|
+
return 0
|
|
136
|
+
|
|
137
|
+
def _check_if_venus_mars_aspect(self, aspect: dict) -> int:
|
|
138
|
+
"""
|
|
139
|
+
Adds 4 points for Venus-Mars aspects.
|
|
140
|
+
"""
|
|
141
|
+
planets = {"Venus", "Mars"}
|
|
142
|
+
|
|
143
|
+
if {aspect["p1_name"], aspect["p2_name"]} == planets:
|
|
144
|
+
score = 4
|
|
145
|
+
self.relevant_default_aspects.append(aspect)
|
|
146
|
+
|
|
147
|
+
self._log_aspect(aspect, score)
|
|
148
|
+
self.relevant_aspects.append(self._create_aspects_dictionary(aspect, score))
|
|
149
|
+
|
|
150
|
+
return score
|
|
151
|
+
return 0
|
|
152
|
+
|
|
153
|
+
def _create_aspects_dictionary(self, aspect: dict, score: int) -> dict:
|
|
154
|
+
"""
|
|
155
|
+
Creates a dictionary representation of an aspect with its score.
|
|
156
|
+
"""
|
|
157
|
+
return {
|
|
158
|
+
"points": score,
|
|
159
|
+
"p1_name": aspect["p1_name"],
|
|
160
|
+
"p2_name": aspect["p2_name"],
|
|
161
|
+
"aspect": aspect["aspect"],
|
|
162
|
+
"orbit": aspect["orbit"],
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
def _calculate_all(self) -> None:
|
|
166
|
+
"""
|
|
167
|
+
Calculates the total score based on all relevant aspects.
|
|
168
|
+
"""
|
|
169
|
+
self.score += self._evaluate_destiny_sign()
|
|
170
|
+
|
|
171
|
+
for aspect in self.__all_synastry_aspects:
|
|
172
|
+
self.score += self._check_if_sun_sun_aspect(aspect)
|
|
173
|
+
self.score += self._check_if_sun_moon_conjunction(aspect)
|
|
174
|
+
self.score += self._check_if_sun_moon_asc_aspect(aspect)
|
|
175
|
+
self.score += self._check_if_venus_mars_aspect(aspect)
|