kerykeion 4.18.5__tar.gz → 4.20.0__tar.gz
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-4.18.5 → kerykeion-4.20.0}/PKG-INFO +64 -18
- {kerykeion-4.18.5 → kerykeion-4.20.0}/README.md +62 -17
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/aspects/natal_aspects.py +15 -5
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/aspects/synastry_aspects.py +4 -7
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/astrological_subject.py +39 -18
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/charts/charts_utils.py +23 -21
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/charts/kerykeion_chart_svg.py +57 -28
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/charts/templates/aspect_grid_only.xml +20 -2
- kerykeion-4.18.5/kerykeion/charts/templates/wheel_only.xml → kerykeion-4.20.0/kerykeion/charts/templates/chart.xml +108 -40
- kerykeion-4.18.5/kerykeion/charts/templates/chart.xml → kerykeion-4.20.0/kerykeion/charts/templates/wheel_only.xml +22 -45
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/enums.py +2 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/kr_types/kr_literals.py +1 -1
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/kr_types/kr_models.py +4 -2
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/kr_types/settings_models.py +3 -1
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/settings/kerykeion_settings.py +4 -4
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/settings/kr.config.json +65 -27
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/utilities.py +12 -7
- {kerykeion-4.18.5 → kerykeion-4.20.0}/pyproject.toml +1 -1
- {kerykeion-4.18.5 → kerykeion-4.20.0}/LICENSE +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/__init__.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/aspects/__init__.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/aspects/aspects_utils.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/charts/__init__.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/charts/draw_planets.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/charts/themes/classic.css +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/charts/themes/dark-high-contrast.css +1 -1
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/charts/themes/dark.css +1 -1
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/charts/themes/light.css +1 -1
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/ephemeris_data.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/fetch_geonames.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/kr_types/__init__.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/kr_types/chart_types.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/kr_types/kerykeion_exception.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/relationship_score/__init__.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/relationship_score/relationship_score.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/relationship_score/relationship_score_factory.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/report.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/settings/__init__.py +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/sweph/README.md +0 -0
- {kerykeion-4.18.5 → kerykeion-4.20.0}/kerykeion/sweph/seas_18.se1 +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: kerykeion
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.20.0
|
|
4
4
|
Summary: A python library for astrology.
|
|
5
5
|
Home-page: https://www.kerykeion.net/
|
|
6
6
|
License: AGPL-3.0
|
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
23
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
23
24
|
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
24
25
|
Classifier: Topic :: Software Development
|
|
@@ -218,23 +219,25 @@ Returns:
|
|
|
218
219
|
+----------+------+-------------+-----------+----------+
|
|
219
220
|
| 8/6/1977 | 8:45 | Atlanta, US | -84.38798 | 33.749 |
|
|
220
221
|
+----------+------+-------------+-----------+----------+
|
|
221
|
-
|
|
222
|
-
| Planet
|
|
223
|
-
|
|
224
|
-
| Sun
|
|
225
|
-
| Moon
|
|
226
|
-
| Mercury
|
|
227
|
-
| Venus
|
|
228
|
-
| Mars
|
|
229
|
-
| Jupiter
|
|
230
|
-
| Saturn
|
|
231
|
-
| Uranus
|
|
232
|
-
| Neptune
|
|
233
|
-
| Pluto
|
|
234
|
-
| Mean_Node
|
|
235
|
-
| True_Node
|
|
236
|
-
|
|
|
237
|
-
|
|
222
|
+
+-----------------+------+-------+------+----------------+
|
|
223
|
+
| Planet | Sign | Pos. | Ret. | House |
|
|
224
|
+
+-----------------+------+-------+------+----------------+
|
|
225
|
+
| Sun | Gem | 17.6 | - | Twelfth_House |
|
|
226
|
+
| Moon | Pis | 16.43 | - | Ninth_House |
|
|
227
|
+
| Mercury | Tau | 26.29 | - | Eleventh_House |
|
|
228
|
+
| Venus | Tau | 2.03 | - | Tenth_House |
|
|
229
|
+
| Mars | Tau | 1.79 | - | Tenth_House |
|
|
230
|
+
| Jupiter | Gem | 14.61 | - | Eleventh_House |
|
|
231
|
+
| Saturn | Leo | 12.8 | - | Second_House |
|
|
232
|
+
| Uranus | Sco | 8.27 | R | Fourth_House |
|
|
233
|
+
| Neptune | Sag | 14.69 | R | Fifth_House |
|
|
234
|
+
| Pluto | Lib | 11.45 | R | Fourth_House |
|
|
235
|
+
| Mean_Node | Lib | 21.49 | R | Fourth_House |
|
|
236
|
+
| True_Node | Lib | 22.82 | R | Fourth_House |
|
|
237
|
+
| Mean_South_Node | Ari | 21.49 | R | Tenth_House |
|
|
238
|
+
| True_South_Node | Ari | 22.82 | R | Tenth_House |
|
|
239
|
+
| Chiron | Tau | 4.17 | - | Tenth_House |
|
|
240
|
+
+-----------------+------+-------+------+----------------+
|
|
238
241
|
+----------------+------+----------+
|
|
239
242
|
| House | Sign | Position |
|
|
240
243
|
+----------------+------+----------+
|
|
@@ -366,6 +369,49 @@ subject = AstrologicalSubject.get_from_iso_utc_time(
|
|
|
366
369
|
"Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US", online=True)
|
|
367
370
|
```
|
|
368
371
|
|
|
372
|
+
## Lunar Nodes (Rahu & Ketu)
|
|
373
|
+
|
|
374
|
+
The following are present:
|
|
375
|
+
|
|
376
|
+
- True North Lunar Node: Simply referred to as "true_node" (without the term "north") for backward compatibility.
|
|
377
|
+
- True South Lunar Node: Referred to as "true_south_node."
|
|
378
|
+
- Mean North Lunar Node: Referred to as "mean_node" (without the term "north") for backward compatibility.
|
|
379
|
+
- Mean South Lunar Node: Referred to as "mean_south_node."
|
|
380
|
+
|
|
381
|
+
In instances of the AstrologicalSubject class, all of them are active by default.
|
|
382
|
+
|
|
383
|
+
In instances of the classes used to generate aspects and SVG charts, only the mean nodes are active. To activate the true nodes, you need to edit the configuration file (kr.config.json).
|
|
384
|
+
Example:
|
|
385
|
+
|
|
386
|
+
```json
|
|
387
|
+
...
|
|
388
|
+
{
|
|
389
|
+
"id": 19,
|
|
390
|
+
"name": "True_South_Node",
|
|
391
|
+
"color": "var(--kerykeion-chart-color-true-node)",
|
|
392
|
+
"is_active": true, // Set to true to activate the true node
|
|
393
|
+
"element_points": 0,
|
|
394
|
+
"related_zodiac_signs": [],
|
|
395
|
+
"label": "True_South_Node"
|
|
396
|
+
}
|
|
397
|
+
...
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
In the charts, by default, the mean nodes (M) are displayed, while the true nodes are not displayed.
|
|
401
|
+
To display them, you need to edit the configuration file (kr.config.json).
|
|
402
|
+
|
|
403
|
+
## JSON Support
|
|
404
|
+
|
|
405
|
+
The astrological subject, which is the base of data used in the library, can be easily serialized to JSON with the `json` method.
|
|
406
|
+
|
|
407
|
+
```python
|
|
408
|
+
from kerykeion import AstrologicalSubject
|
|
409
|
+
|
|
410
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US")
|
|
411
|
+
|
|
412
|
+
print(johnny.json(dump=False, indent=2))
|
|
413
|
+
```
|
|
414
|
+
|
|
369
415
|
## Documentation
|
|
370
416
|
|
|
371
417
|
Most of the functions and the classes are self documented by the types and have docstrings.
|
|
@@ -181,23 +181,25 @@ Returns:
|
|
|
181
181
|
+----------+------+-------------+-----------+----------+
|
|
182
182
|
| 8/6/1977 | 8:45 | Atlanta, US | -84.38798 | 33.749 |
|
|
183
183
|
+----------+------+-------------+-----------+----------+
|
|
184
|
-
|
|
185
|
-
| Planet
|
|
186
|
-
|
|
187
|
-
| Sun
|
|
188
|
-
| Moon
|
|
189
|
-
| Mercury
|
|
190
|
-
| Venus
|
|
191
|
-
| Mars
|
|
192
|
-
| Jupiter
|
|
193
|
-
| Saturn
|
|
194
|
-
| Uranus
|
|
195
|
-
| Neptune
|
|
196
|
-
| Pluto
|
|
197
|
-
| Mean_Node
|
|
198
|
-
| True_Node
|
|
199
|
-
|
|
|
200
|
-
|
|
184
|
+
+-----------------+------+-------+------+----------------+
|
|
185
|
+
| Planet | Sign | Pos. | Ret. | House |
|
|
186
|
+
+-----------------+------+-------+------+----------------+
|
|
187
|
+
| Sun | Gem | 17.6 | - | Twelfth_House |
|
|
188
|
+
| Moon | Pis | 16.43 | - | Ninth_House |
|
|
189
|
+
| Mercury | Tau | 26.29 | - | Eleventh_House |
|
|
190
|
+
| Venus | Tau | 2.03 | - | Tenth_House |
|
|
191
|
+
| Mars | Tau | 1.79 | - | Tenth_House |
|
|
192
|
+
| Jupiter | Gem | 14.61 | - | Eleventh_House |
|
|
193
|
+
| Saturn | Leo | 12.8 | - | Second_House |
|
|
194
|
+
| Uranus | Sco | 8.27 | R | Fourth_House |
|
|
195
|
+
| Neptune | Sag | 14.69 | R | Fifth_House |
|
|
196
|
+
| Pluto | Lib | 11.45 | R | Fourth_House |
|
|
197
|
+
| Mean_Node | Lib | 21.49 | R | Fourth_House |
|
|
198
|
+
| True_Node | Lib | 22.82 | R | Fourth_House |
|
|
199
|
+
| Mean_South_Node | Ari | 21.49 | R | Tenth_House |
|
|
200
|
+
| True_South_Node | Ari | 22.82 | R | Tenth_House |
|
|
201
|
+
| Chiron | Tau | 4.17 | - | Tenth_House |
|
|
202
|
+
+-----------------+------+-------+------+----------------+
|
|
201
203
|
+----------------+------+----------+
|
|
202
204
|
| House | Sign | Position |
|
|
203
205
|
+----------------+------+----------+
|
|
@@ -329,6 +331,49 @@ subject = AstrologicalSubject.get_from_iso_utc_time(
|
|
|
329
331
|
"Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US", online=True)
|
|
330
332
|
```
|
|
331
333
|
|
|
334
|
+
## Lunar Nodes (Rahu & Ketu)
|
|
335
|
+
|
|
336
|
+
The following are present:
|
|
337
|
+
|
|
338
|
+
- True North Lunar Node: Simply referred to as "true_node" (without the term "north") for backward compatibility.
|
|
339
|
+
- True South Lunar Node: Referred to as "true_south_node."
|
|
340
|
+
- Mean North Lunar Node: Referred to as "mean_node" (without the term "north") for backward compatibility.
|
|
341
|
+
- Mean South Lunar Node: Referred to as "mean_south_node."
|
|
342
|
+
|
|
343
|
+
In instances of the AstrologicalSubject class, all of them are active by default.
|
|
344
|
+
|
|
345
|
+
In instances of the classes used to generate aspects and SVG charts, only the mean nodes are active. To activate the true nodes, you need to edit the configuration file (kr.config.json).
|
|
346
|
+
Example:
|
|
347
|
+
|
|
348
|
+
```json
|
|
349
|
+
...
|
|
350
|
+
{
|
|
351
|
+
"id": 19,
|
|
352
|
+
"name": "True_South_Node",
|
|
353
|
+
"color": "var(--kerykeion-chart-color-true-node)",
|
|
354
|
+
"is_active": true, // Set to true to activate the true node
|
|
355
|
+
"element_points": 0,
|
|
356
|
+
"related_zodiac_signs": [],
|
|
357
|
+
"label": "True_South_Node"
|
|
358
|
+
}
|
|
359
|
+
...
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
In the charts, by default, the mean nodes (M) are displayed, while the true nodes are not displayed.
|
|
363
|
+
To display them, you need to edit the configuration file (kr.config.json).
|
|
364
|
+
|
|
365
|
+
## JSON Support
|
|
366
|
+
|
|
367
|
+
The astrological subject, which is the base of data used in the library, can be easily serialized to JSON with the `json` method.
|
|
368
|
+
|
|
369
|
+
```python
|
|
370
|
+
from kerykeion import AstrologicalSubject
|
|
371
|
+
|
|
372
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US")
|
|
373
|
+
|
|
374
|
+
print(johnny.json(dump=False, indent=2))
|
|
375
|
+
```
|
|
376
|
+
|
|
332
377
|
## Documentation
|
|
333
378
|
|
|
334
379
|
Most of the functions and the classes are self documented by the types and have docstrings.
|
|
@@ -54,8 +54,18 @@ class NatalAspects:
|
|
|
54
54
|
for first in range(len(active_points_list)):
|
|
55
55
|
# Generates the aspects list without repetitions
|
|
56
56
|
for second in range(first + 1, len(active_points_list)):
|
|
57
|
+
# South Node and North Node are always in opposition
|
|
58
|
+
nodes_pairs = {
|
|
59
|
+
("True_Node", "True_South_Node"),
|
|
60
|
+
("Mean_Node", "Mean_South_Node"),
|
|
61
|
+
("True_South_Node", "True_Node"),
|
|
62
|
+
("Mean_South_Node", "Mean_Node"),
|
|
63
|
+
}
|
|
64
|
+
if (active_points_list[first]["name"], active_points_list[second]["name"]) in nodes_pairs:
|
|
65
|
+
continue
|
|
66
|
+
|
|
57
67
|
aspect = get_aspect_from_two_points(
|
|
58
|
-
self.aspects_settings, active_points_list[first]["abs_pos"],
|
|
68
|
+
self.aspects_settings, active_points_list[first]["abs_pos"],
|
|
59
69
|
active_points_list[second]["abs_pos"]
|
|
60
70
|
)
|
|
61
71
|
|
|
@@ -132,12 +142,12 @@ if __name__ == "__main__":
|
|
|
132
142
|
|
|
133
143
|
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US")
|
|
134
144
|
|
|
135
|
-
# All aspects
|
|
145
|
+
# All aspects as a list of dictionaries
|
|
136
146
|
aspects = NatalAspects(johnny)
|
|
137
|
-
print(aspects.all_aspects)
|
|
147
|
+
print([a.model_dump() for a in aspects.all_aspects])
|
|
138
148
|
|
|
139
149
|
print("\n")
|
|
140
150
|
|
|
141
|
-
# Relevant aspects
|
|
151
|
+
# Relevant aspects as a list of dictionaries
|
|
142
152
|
aspects = NatalAspects(johnny)
|
|
143
|
-
print(aspects.relevant_aspects)
|
|
153
|
+
print([a.model_dump() for a in aspects.relevant_aspects])
|
|
@@ -101,13 +101,10 @@ if __name__ == "__main__":
|
|
|
101
101
|
|
|
102
102
|
setup_logging(level="debug")
|
|
103
103
|
|
|
104
|
-
john = AstrologicalSubject("John", 1940, 10, 9,
|
|
105
|
-
yoko = AstrologicalSubject("Yoko", 1933, 2, 18,
|
|
104
|
+
john = AstrologicalSubject("John", 1940, 10, 9, 10, 30, "Liverpool", "GB")
|
|
105
|
+
yoko = AstrologicalSubject("Yoko", 1933, 2, 18, 10, 30, "Tokyo", "JP")
|
|
106
106
|
|
|
107
107
|
synastry_aspects = SynastryAspects(john, yoko)
|
|
108
108
|
|
|
109
|
-
# All aspects
|
|
110
|
-
print(synastry_aspects.all_aspects)
|
|
111
|
-
|
|
112
|
-
# Relevant aspects
|
|
113
|
-
print(synastry_aspects.relevant_aspects)
|
|
109
|
+
# All aspects as a list of dictionaries
|
|
110
|
+
print([aspect.dict() for aspect in synastry_aspects.all_aspects])
|
|
@@ -25,8 +25,8 @@ from kerykeion.kr_types import (
|
|
|
25
25
|
Houses
|
|
26
26
|
)
|
|
27
27
|
from kerykeion.utilities import (
|
|
28
|
-
get_number_from_name,
|
|
29
|
-
get_kerykeion_point_from_degree,
|
|
28
|
+
get_number_from_name,
|
|
29
|
+
get_kerykeion_point_from_degree,
|
|
30
30
|
get_planet_house,
|
|
31
31
|
get_moon_emoji_from_phase_int,
|
|
32
32
|
get_moon_phase_name_from_phase_int,
|
|
@@ -79,7 +79,7 @@ class AstrologicalSubject:
|
|
|
79
79
|
- online (bool, optional): Sets if you want to use the online mode, which fetches the timezone and coordinates from geonames.
|
|
80
80
|
If you already have the coordinates and timezone, set this to False. Defaults to True.
|
|
81
81
|
- disable_chiron: Deprecated, use disable_chiron_and_lilith instead.
|
|
82
|
-
- sidereal_mode (SiderealMode, optional): Also known as Ayanamsa.
|
|
82
|
+
- sidereal_mode (SiderealMode, optional): Also known as Ayanamsa.
|
|
83
83
|
The mode to use for the sidereal zodiac, according to the Swiss Ephemeris.
|
|
84
84
|
Defaults to "FAGAN_BRADLEY".
|
|
85
85
|
Available modes are visible in the SiderealMode Literal.
|
|
@@ -139,6 +139,8 @@ class AstrologicalSubject:
|
|
|
139
139
|
mean_node: KerykeionPointModel
|
|
140
140
|
chiron: Union[KerykeionPointModel, None]
|
|
141
141
|
mean_lilith: Union[KerykeionPointModel, None]
|
|
142
|
+
true_south_node: KerykeionPointModel
|
|
143
|
+
mean_south_node: KerykeionPointModel
|
|
142
144
|
|
|
143
145
|
# Houses
|
|
144
146
|
first_house: KerykeionPointModel
|
|
@@ -197,10 +199,10 @@ class AstrologicalSubject:
|
|
|
197
199
|
"Please use 'disable_chiron' instead.",
|
|
198
200
|
DeprecationWarning
|
|
199
201
|
)
|
|
200
|
-
|
|
202
|
+
|
|
201
203
|
if disable_chiron_and_lilith:
|
|
202
204
|
raise ValueError("Cannot specify both 'disable_chiron' and 'disable_chiron_and_lilith'. Use 'disable_chiron_and_lilith' only.")
|
|
203
|
-
|
|
205
|
+
|
|
204
206
|
self.disable_chiron_and_lilith = disable_chiron
|
|
205
207
|
# <--- Deprecation warnings
|
|
206
208
|
|
|
@@ -225,7 +227,7 @@ class AstrologicalSubject:
|
|
|
225
227
|
#---------------#
|
|
226
228
|
|
|
227
229
|
# Geonames username
|
|
228
|
-
if geonames_username is None and online:
|
|
230
|
+
if geonames_username is None and online and (not lat or not lng or not tz_str):
|
|
229
231
|
logging.warning(GEONAMES_DEFAULT_USERNAME_WARNING)
|
|
230
232
|
self.geonames_username = DEFAULT_GEONAMES_USERNAME
|
|
231
233
|
else:
|
|
@@ -251,7 +253,7 @@ class AstrologicalSubject:
|
|
|
251
253
|
logging.info("No latitude specified, using London as default")
|
|
252
254
|
else:
|
|
253
255
|
self.lat = lat # type: ignore
|
|
254
|
-
|
|
256
|
+
|
|
255
257
|
# Longitude
|
|
256
258
|
if not lng and not self.online:
|
|
257
259
|
self.lng = 0
|
|
@@ -278,7 +280,7 @@ class AstrologicalSubject:
|
|
|
278
280
|
# Chart Perspective check and setup --->
|
|
279
281
|
if self.perspective_type not in get_args(PerspectiveType):
|
|
280
282
|
raise KerykeionException(f"\n* ERROR: '{self.perspective_type}' is NOT a valid chart perspective! Available perspectives are: *" + "\n" + str(get_args(PerspectiveType)))
|
|
281
|
-
|
|
283
|
+
|
|
282
284
|
if self.perspective_type == "True Geocentric":
|
|
283
285
|
self._iflag += swe.FLG_TRUEPOS
|
|
284
286
|
elif self.perspective_type == "Heliocentric":
|
|
@@ -304,14 +306,14 @@ class AstrologicalSubject:
|
|
|
304
306
|
|
|
305
307
|
if self.sidereal_mode and self.zodiac_type == "Tropic":
|
|
306
308
|
raise KerykeionException("You can't set a sidereal mode with a Tropic zodiac type!")
|
|
307
|
-
|
|
309
|
+
|
|
308
310
|
if self.zodiac_type == "Sidereal" and not self.sidereal_mode:
|
|
309
311
|
self.sidereal_mode = DEFAULT_SIDEREAL_MODE
|
|
310
312
|
logging.info("No sidereal mode set, using default FAGAN_BRADLEY")
|
|
311
313
|
|
|
312
314
|
if self.zodiac_type == "Sidereal":
|
|
313
315
|
# Check if the sidereal mode is valid
|
|
314
|
-
|
|
316
|
+
|
|
315
317
|
if not self.sidereal_mode or not self.sidereal_mode in get_args(SiderealMode):
|
|
316
318
|
raise KerykeionException(f"\n* ERROR: '{self.sidereal_mode}' is NOT a valid sidereal mode! Available modes are: *" + "\n" + str(get_args(SiderealMode)))
|
|
317
319
|
|
|
@@ -328,7 +330,7 @@ class AstrologicalSubject:
|
|
|
328
330
|
# UTC, julian day and local time setup --->
|
|
329
331
|
if (self.online) and (not self.tz_str) and (not self.lat) and (not self.lng):
|
|
330
332
|
self._fetch_and_set_tz_and_coordinates_from_geonames()
|
|
331
|
-
|
|
333
|
+
|
|
332
334
|
self.lat = check_and_adjust_polar_latitude(self.lat)
|
|
333
335
|
|
|
334
336
|
# Local time to UTC
|
|
@@ -496,6 +498,10 @@ class AstrologicalSubject:
|
|
|
496
498
|
pluto_deg = swe.calc(self.julian_day, 9, self._iflag)[0][0]
|
|
497
499
|
mean_node_deg = swe.calc(self.julian_day, 10, self._iflag)[0][0]
|
|
498
500
|
true_node_deg = swe.calc(self.julian_day, 11, self._iflag)[0][0]
|
|
501
|
+
# For south nodes there exist no Swiss Ephemeris library calculation function,
|
|
502
|
+
# but they are simply opposite the north node.
|
|
503
|
+
mean_south_node_deg = (mean_node_deg + 180) % 360
|
|
504
|
+
true_south_node_deg = (true_node_deg + 180) % 360
|
|
499
505
|
|
|
500
506
|
self.sun = get_kerykeion_point_from_degree(sun_deg, "Sun", point_type=point_type)
|
|
501
507
|
self.moon = get_kerykeion_point_from_degree(moon_deg, "Moon", point_type=point_type)
|
|
@@ -509,6 +515,8 @@ class AstrologicalSubject:
|
|
|
509
515
|
self.pluto = get_kerykeion_point_from_degree(pluto_deg, "Pluto", point_type=point_type)
|
|
510
516
|
self.mean_node = get_kerykeion_point_from_degree(mean_node_deg, "Mean_Node", point_type=point_type)
|
|
511
517
|
self.true_node = get_kerykeion_point_from_degree(true_node_deg, "True_Node", point_type=point_type)
|
|
518
|
+
self.mean_south_node = get_kerykeion_point_from_degree(mean_south_node_deg, "Mean_South_Node", point_type=point_type)
|
|
519
|
+
self.true_south_node = get_kerykeion_point_from_degree(true_south_node_deg, "True_South_Node", point_type=point_type)
|
|
512
520
|
|
|
513
521
|
self.sun.house = get_planet_house(sun_deg, self._houses_degree_ut)
|
|
514
522
|
self.moon.house = get_planet_house(moon_deg, self._houses_degree_ut)
|
|
@@ -522,6 +530,9 @@ class AstrologicalSubject:
|
|
|
522
530
|
self.pluto.house = get_planet_house(pluto_deg, self._houses_degree_ut)
|
|
523
531
|
self.mean_node.house = get_planet_house(mean_node_deg, self._houses_degree_ut)
|
|
524
532
|
self.true_node.house = get_planet_house(true_node_deg, self._houses_degree_ut)
|
|
533
|
+
self.mean_south_node.house = get_planet_house(mean_south_node_deg, self._houses_degree_ut)
|
|
534
|
+
self.true_south_node.house = get_planet_house(true_south_node_deg, self._houses_degree_ut)
|
|
535
|
+
|
|
525
536
|
|
|
526
537
|
# Deprecated
|
|
527
538
|
planets_list = [
|
|
@@ -537,6 +548,8 @@ class AstrologicalSubject:
|
|
|
537
548
|
self.pluto,
|
|
538
549
|
self.mean_node,
|
|
539
550
|
self.true_node,
|
|
551
|
+
self.mean_south_node,
|
|
552
|
+
self.true_south_node,
|
|
540
553
|
]
|
|
541
554
|
|
|
542
555
|
if not self.disable_chiron_and_lilith:
|
|
@@ -563,6 +576,14 @@ class AstrologicalSubject:
|
|
|
563
576
|
# Check in retrograde or not:
|
|
564
577
|
for planet in planets_list:
|
|
565
578
|
planet_number = get_number_from_name(planet["name"])
|
|
579
|
+
|
|
580
|
+
# Swiss ephemeris library does not offer calculation of direction of south nodes.
|
|
581
|
+
# But south nodes have same direction as north nodes. We can use those to calculate direction.
|
|
582
|
+
if planet_number == 1000: # Number of Mean South Node
|
|
583
|
+
planet_number = 10 # Number of Mean North Node
|
|
584
|
+
elif planet_number == 1100: # Number of True South Node
|
|
585
|
+
planet_number = 11 # Number of True North Node
|
|
586
|
+
|
|
566
587
|
if swe.calc(self.julian_day, planet_number, self._iflag)[0][3] < 0:
|
|
567
588
|
planet["retrograde"] = True
|
|
568
589
|
else:
|
|
@@ -651,7 +672,7 @@ class AstrologicalSubject:
|
|
|
651
672
|
Returns the UTC time as a float.
|
|
652
673
|
"""
|
|
653
674
|
dt = datetime.fromisoformat(self.iso_formatted_utc_datetime)
|
|
654
|
-
|
|
675
|
+
|
|
655
676
|
# Extract the hours, minutes, and seconds
|
|
656
677
|
hours = dt.hour
|
|
657
678
|
minutes = dt.minute
|
|
@@ -669,7 +690,7 @@ class AstrologicalSubject:
|
|
|
669
690
|
Returns the local time as a float.
|
|
670
691
|
"""
|
|
671
692
|
dt = datetime.fromisoformat(self.iso_formatted_local_datetime)
|
|
672
|
-
|
|
693
|
+
|
|
673
694
|
# Extract the hours, minutes, and seconds
|
|
674
695
|
hours = dt.hour
|
|
675
696
|
minutes = dt.minute
|
|
@@ -684,8 +705,8 @@ class AstrologicalSubject:
|
|
|
684
705
|
@staticmethod
|
|
685
706
|
def get_from_iso_utc_time(
|
|
686
707
|
name: str,
|
|
687
|
-
iso_utc_time: str,
|
|
688
|
-
city: str = "Greenwich",
|
|
708
|
+
iso_utc_time: str,
|
|
709
|
+
city: str = "Greenwich",
|
|
689
710
|
nation: str = "GB",
|
|
690
711
|
tz_str: str = "Etc/GMT",
|
|
691
712
|
online: bool = False,
|
|
@@ -697,7 +718,7 @@ class AstrologicalSubject:
|
|
|
697
718
|
sidereal_mode: Union[SiderealMode, None] = None,
|
|
698
719
|
houses_system_identifier: HousesSystemIdentifier = DEFAULT_HOUSES_SYSTEM_IDENTIFIER,
|
|
699
720
|
perspective_type: PerspectiveType = DEFAULT_PERSPECTIVE_TYPE
|
|
700
|
-
|
|
721
|
+
|
|
701
722
|
) -> "AstrologicalSubject":
|
|
702
723
|
"""
|
|
703
724
|
Creates an AstrologicalSubject object from an iso formatted UTC time.
|
|
@@ -775,7 +796,7 @@ if __name__ == "__main__":
|
|
|
775
796
|
from kerykeion.utilities import setup_logging
|
|
776
797
|
|
|
777
798
|
setup_logging(level="debug")
|
|
778
|
-
|
|
799
|
+
|
|
779
800
|
# With Chiron enabled
|
|
780
801
|
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US")
|
|
781
802
|
print(json.loads(johnny.json(dump=True)))
|
|
@@ -814,5 +835,5 @@ if __name__ == "__main__":
|
|
|
814
835
|
print(johnny.mean_lilith)
|
|
815
836
|
|
|
816
837
|
# Offline mode
|
|
817
|
-
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", online=False, tz_str="America/New_York", lng=-87.1111, lat=37.7711)
|
|
838
|
+
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", online=False, tz_str="America/New_York", lng=-87.1111, lat=37.7711, sidereal_mode="FAGAN_BRADLEY", zodiac_type="Sidereal")
|
|
818
839
|
print(johnny.json(dump=True, indent=2))
|
|
@@ -34,7 +34,8 @@ def get_decoded_kerykeion_celestial_point_name(input_planet_name: str, celestial
|
|
|
34
34
|
return celestial_point_language[input_planet_name]
|
|
35
35
|
|
|
36
36
|
# Return the special house name if it exists, otherwise return an empty string
|
|
37
|
-
|
|
37
|
+
decoded_special_name = special_house_names.get(input_planet_name, "")
|
|
38
|
+
return celestial_point_language[decoded_special_name]
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
def decHourJoin(inH: int, inM: int, inS: int) -> float:
|
|
@@ -515,8 +516,8 @@ def draw_third_circle(
|
|
|
515
516
|
|
|
516
517
|
|
|
517
518
|
def draw_aspect_grid(
|
|
518
|
-
stroke_color: str,
|
|
519
|
-
available_planets: list,
|
|
519
|
+
stroke_color: str,
|
|
520
|
+
available_planets: list,
|
|
520
521
|
aspects: list,
|
|
521
522
|
x_start: int = 380,
|
|
522
523
|
y_start: int = 468,
|
|
@@ -705,7 +706,7 @@ def draw_transit_aspect_list(
|
|
|
705
706
|
Returns:
|
|
706
707
|
- A string containing the SVG path data for the aspect transit grid.
|
|
707
708
|
"""
|
|
708
|
-
|
|
709
|
+
|
|
709
710
|
if isinstance(celestial_point_language, dict):
|
|
710
711
|
celestial_point_language = KerykeionLanguageCelestialPointModel(**celestial_point_language)
|
|
711
712
|
|
|
@@ -719,26 +720,29 @@ def draw_transit_aspect_list(
|
|
|
719
720
|
line = 0
|
|
720
721
|
nl = 0
|
|
721
722
|
inner_path = ""
|
|
722
|
-
scale = 1
|
|
723
723
|
for i, aspect in enumerate(aspects_list):
|
|
724
724
|
# Adjust the vertical position for every 12 aspects
|
|
725
|
-
if i ==
|
|
725
|
+
if i == 14:
|
|
726
726
|
nl = 100
|
|
727
727
|
line = 0
|
|
728
728
|
|
|
729
|
-
elif i ==
|
|
729
|
+
elif i == 28:
|
|
730
730
|
nl = 200
|
|
731
731
|
line = 0
|
|
732
732
|
|
|
733
|
-
elif i ==
|
|
733
|
+
elif i == 42:
|
|
734
734
|
nl = 300
|
|
735
735
|
line = 0
|
|
736
736
|
|
|
737
|
-
elif i ==
|
|
737
|
+
elif i == 56:
|
|
738
738
|
nl = 400
|
|
739
|
+
line = 0
|
|
740
|
+
|
|
741
|
+
elif i == 70:
|
|
742
|
+
nl = 500
|
|
739
743
|
# When there are more than 60 aspects, the text is moved up
|
|
740
|
-
if len(aspects_list) >
|
|
741
|
-
line = -1 * (len(aspects_list) -
|
|
744
|
+
if len(aspects_list) > 84:
|
|
745
|
+
line = -1 * (len(aspects_list) - 84) * 14
|
|
742
746
|
else:
|
|
743
747
|
line = 0
|
|
744
748
|
|
|
@@ -761,7 +765,7 @@ def draw_transit_aspect_list(
|
|
|
761
765
|
inner_path += f"</g>"
|
|
762
766
|
line = line + 14
|
|
763
767
|
|
|
764
|
-
out = f'<g style="transform: translate(
|
|
768
|
+
out = f'<g style="transform: translate(43%, 50%)">'
|
|
765
769
|
out += f'<text y="-15" x="0" style="fill: var(--kerykeion-chart-color-paper-0); font-size: 14px;">{grid_title}:</text>'
|
|
766
770
|
out += inner_path
|
|
767
771
|
out += "</g>"
|
|
@@ -863,11 +867,11 @@ def draw_house_grid(
|
|
|
863
867
|
Returns:
|
|
864
868
|
- str: The SVG code for the grid of houses.
|
|
865
869
|
"""
|
|
866
|
-
|
|
870
|
+
|
|
867
871
|
if chart_type in ["Synastry", "Transit"] and secondary_subject_houses_list is None:
|
|
868
872
|
raise KerykeionException("secondary_houses is None")
|
|
869
873
|
|
|
870
|
-
svg_output = '<g transform="translate(
|
|
874
|
+
svg_output = '<g transform="translate(650,-20)">'
|
|
871
875
|
|
|
872
876
|
line_increment = 10
|
|
873
877
|
for i, house in enumerate(main_subject_houses_list):
|
|
@@ -885,7 +889,7 @@ def draw_house_grid(
|
|
|
885
889
|
|
|
886
890
|
if chart_type == "Synastry":
|
|
887
891
|
svg_output += '<!-- Synastry Houses -->'
|
|
888
|
-
svg_output += '<g transform="translate(
|
|
892
|
+
svg_output += '<g transform="translate(910, -20)">'
|
|
889
893
|
line_increment = 10
|
|
890
894
|
|
|
891
895
|
for i, house in enumerate(secondary_subject_houses_list): # type: ignore
|
|
@@ -935,8 +939,7 @@ def draw_planet_grid(
|
|
|
935
939
|
offset_between_lines = 14
|
|
936
940
|
|
|
937
941
|
svg_output = (
|
|
938
|
-
f'<g transform="translate(
|
|
939
|
-
f'<g transform="translate(140, -15)">'
|
|
942
|
+
f'<g transform="translate(175, -15)">'
|
|
940
943
|
f'<text text-anchor="end" style="fill:{text_color}; font-size: 14px;">{planets_and_houses_grid_title} {subject_name}:</text>'
|
|
941
944
|
f'</g>'
|
|
942
945
|
)
|
|
@@ -1003,13 +1006,12 @@ def draw_planet_grid(
|
|
|
1003
1006
|
svg_output += end_of_line
|
|
1004
1007
|
second_line_height += offset_between_lines
|
|
1005
1008
|
|
|
1006
|
-
svg_output += end_of_line
|
|
1007
1009
|
return svg_output
|
|
1008
1010
|
|
|
1009
1011
|
|
|
1010
1012
|
def draw_transit_aspect_grid(
|
|
1011
|
-
stroke_color: str,
|
|
1012
|
-
available_planets: list,
|
|
1013
|
+
stroke_color: str,
|
|
1014
|
+
available_planets: list,
|
|
1013
1015
|
aspects: list,
|
|
1014
1016
|
x_indent: int = 50,
|
|
1015
1017
|
y_indent: int = 250,
|
|
@@ -1080,4 +1082,4 @@ def draw_transit_aspect_grid(
|
|
|
1080
1082
|
if (aspect["p1"] == planet_a["id"] and aspect["p2"] == planet_b["id"]):
|
|
1081
1083
|
svg_output += f'<use x="{x_aspect - box_size + 1}" y="{y_aspect + 1}" xlink:href="#orb{aspect["aspect_degrees"]}" />'
|
|
1082
1084
|
|
|
1083
|
-
return svg_output
|
|
1085
|
+
return svg_output
|