kerykeion 3.1.1__py3-none-any.whl → 5.1.9__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.

Files changed (75) hide show
  1. kerykeion/__init__.py +58 -141
  2. kerykeion/aspects/__init__.py +14 -0
  3. kerykeion/aspects/aspects_factory.py +568 -0
  4. kerykeion/aspects/aspects_utils.py +164 -0
  5. kerykeion/astrological_subject_factory.py +1901 -0
  6. kerykeion/backword.py +820 -0
  7. kerykeion/chart_data_factory.py +552 -0
  8. kerykeion/charts/__init__.py +5 -0
  9. kerykeion/charts/chart_drawer.py +2794 -0
  10. kerykeion/charts/charts_utils.py +1840 -0
  11. kerykeion/charts/draw_planets.py +658 -0
  12. kerykeion/charts/templates/aspect_grid_only.xml +596 -0
  13. kerykeion/charts/templates/chart.xml +741 -0
  14. kerykeion/charts/templates/wheel_only.xml +653 -0
  15. kerykeion/charts/themes/black-and-white.css +148 -0
  16. kerykeion/charts/themes/classic.css +113 -0
  17. kerykeion/charts/themes/dark-high-contrast.css +159 -0
  18. kerykeion/charts/themes/dark.css +160 -0
  19. kerykeion/charts/themes/light.css +160 -0
  20. kerykeion/charts/themes/strawberry.css +158 -0
  21. kerykeion/composite_subject_factory.py +408 -0
  22. kerykeion/ephemeris_data_factory.py +443 -0
  23. kerykeion/fetch_geonames.py +105 -61
  24. kerykeion/house_comparison/__init__.py +6 -0
  25. kerykeion/house_comparison/house_comparison_factory.py +103 -0
  26. kerykeion/house_comparison/house_comparison_utils.py +126 -0
  27. kerykeion/kr_types/__init__.py +70 -0
  28. kerykeion/kr_types/chart_template_model.py +20 -0
  29. kerykeion/kr_types/kerykeion_exception.py +20 -0
  30. kerykeion/kr_types/kr_literals.py +20 -0
  31. kerykeion/kr_types/kr_models.py +20 -0
  32. kerykeion/kr_types/settings_models.py +20 -0
  33. kerykeion/planetary_return_factory.py +805 -0
  34. kerykeion/relationship_score_factory.py +301 -0
  35. kerykeion/report.py +779 -0
  36. kerykeion/schemas/__init__.py +106 -0
  37. kerykeion/schemas/chart_template_model.py +367 -0
  38. kerykeion/schemas/kerykeion_exception.py +20 -0
  39. kerykeion/schemas/kr_literals.py +181 -0
  40. kerykeion/schemas/kr_models.py +603 -0
  41. kerykeion/schemas/settings_models.py +188 -0
  42. kerykeion/settings/__init__.py +20 -0
  43. kerykeion/settings/chart_defaults.py +444 -0
  44. kerykeion/settings/config_constants.py +152 -0
  45. kerykeion/settings/kerykeion_settings.py +51 -0
  46. kerykeion/settings/translation_strings.py +1499 -0
  47. kerykeion/settings/translations.py +74 -0
  48. kerykeion/sweph/README.md +3 -0
  49. kerykeion/sweph/ast136/s136108s.se1 +0 -0
  50. kerykeion/sweph/ast136/s136199s.se1 +0 -0
  51. kerykeion/sweph/ast136/s136472s.se1 +0 -0
  52. kerykeion/sweph/ast28/se28978s.se1 +0 -0
  53. kerykeion/sweph/ast50/se50000s.se1 +0 -0
  54. kerykeion/sweph/ast90/se90377s.se1 +0 -0
  55. kerykeion/sweph/ast90/se90482s.se1 +0 -0
  56. kerykeion/sweph/seas_18.se1 +0 -0
  57. kerykeion/sweph/sefstars.txt +1602 -0
  58. kerykeion/transits_time_range_factory.py +302 -0
  59. kerykeion/utilities.py +762 -130
  60. kerykeion-5.1.9.dist-info/METADATA +1793 -0
  61. kerykeion-5.1.9.dist-info/RECORD +63 -0
  62. {kerykeion-3.1.1.dist-info → kerykeion-5.1.9.dist-info}/WHEEL +1 -2
  63. kerykeion-5.1.9.dist-info/licenses/LICENSE +661 -0
  64. kerykeion/aspects.py +0 -331
  65. kerykeion/charts/charts_svg.py +0 -1607
  66. kerykeion/charts/templates/basic.xml +0 -285
  67. kerykeion/charts/templates/extended.xml +0 -294
  68. kerykeion/kr.config.json +0 -464
  69. kerykeion/main.py +0 -595
  70. kerykeion/print_all_data.py +0 -44
  71. kerykeion/relationship_score.py +0 -219
  72. kerykeion/types.py +0 -190
  73. kerykeion-3.1.1.dist-info/METADATA +0 -204
  74. kerykeion-3.1.1.dist-info/RECORD +0 -17
  75. kerykeion-3.1.1.dist-info/top_level.txt +0 -1
@@ -0,0 +1,443 @@
1
+ """
2
+ Ephemeris Data Factory Module
3
+
4
+ This module provides the EphemerisDataFactory class for generating time-series
5
+ astrological ephemeris data. It enables the creation of comprehensive astronomical
6
+ and astrological datasets across specified date ranges with flexible time intervals
7
+ and calculation parameters.
8
+
9
+ Key Features:
10
+ - Time-series ephemeris data generation
11
+ - Multiple time interval support (days, hours, minutes)
12
+ - Configurable astrological calculation systems
13
+ - Built-in performance safeguards and limits
14
+ - Multiple output formats (dictionaries or model instances)
15
+ - Complete AstrologicalSubject instance generation
16
+
17
+ The module supports both lightweight data extraction (via get_ephemeris_data)
18
+ and full-featured astrological analysis (via get_ephemeris_data_as_astrological_subjects),
19
+ making it suitable for various use cases from simple data collection to complex
20
+ astrological research and analysis applications.
21
+
22
+ Classes:
23
+ EphemerisDataFactory: Main factory class for generating ephemeris data
24
+
25
+ Dependencies:
26
+ - kerykeion.AstrologicalSubjectFactory: For creating astrological subjects
27
+ - kerykeion.utilities: For house and planetary data extraction
28
+ - kerykeion.schemas: For type definitions and model structures
29
+ - datetime: For date/time handling
30
+ - logging: For performance warnings
31
+
32
+ Example:
33
+ Basic usage for daily ephemeris data:
34
+
35
+ >>> from datetime import datetime
36
+ >>> from kerykeion.ephemeris_data_factory import EphemerisDataFactory
37
+ >>>
38
+ >>> start = datetime(2024, 1, 1)
39
+ >>> end = datetime(2024, 1, 31)
40
+ >>> factory = EphemerisDataFactory(start, end)
41
+ >>> data = factory.get_ephemeris_data()
42
+ >>> print(f"Generated {len(data)} data points")
43
+
44
+ Author: Giacomo Battaglia
45
+ Copyright: (C) 2025 Kerykeion Project
46
+ License: AGPL-3.0
47
+ """
48
+
49
+ from kerykeion import AstrologicalSubjectFactory
50
+ from kerykeion.schemas.kr_models import AstrologicalSubjectModel
51
+ from kerykeion.utilities import (
52
+ get_houses_list,
53
+ get_available_astrological_points_list,
54
+ normalize_zodiac_type,
55
+ )
56
+ from kerykeion.astrological_subject_factory import DEFAULT_HOUSES_SYSTEM_IDENTIFIER, DEFAULT_PERSPECTIVE_TYPE, DEFAULT_ZODIAC_TYPE
57
+ from kerykeion.schemas import (
58
+ EphemerisDictModel,
59
+ SiderealMode,
60
+ HousesSystemIdentifier,
61
+ PerspectiveType,
62
+ ZodiacType,
63
+ )
64
+ from datetime import datetime, timedelta
65
+ from typing import Literal, Union, List
66
+ import logging
67
+
68
+
69
+ class EphemerisDataFactory:
70
+ """
71
+ A factory class for generating ephemeris data over a specified date range.
72
+
73
+ This class calculates astrological ephemeris data (planetary positions and house cusps)
74
+ for a sequence of dates, allowing for detailed astronomical calculations across time periods.
75
+ It supports different time intervals (days, hours, or minutes) and various astrological
76
+ calculation systems.
77
+
78
+ The factory creates data points at regular intervals between start and end dates,
79
+ with built-in safeguards to prevent excessive computational loads through configurable
80
+ maximum limits.
81
+
82
+ Args:
83
+ start_datetime (datetime): The starting date and time for ephemeris calculations.
84
+ end_datetime (datetime): The ending date and time for ephemeris calculations.
85
+ step_type (Literal["days", "hours", "minutes"], optional): The time interval unit
86
+ for data points. Defaults to "days".
87
+ step (int, optional): The number of units to advance for each data point.
88
+ For example, step=2 with step_type="days" creates data points every 2 days.
89
+ Defaults to 1.
90
+ lat (float, optional): Geographic latitude in decimal degrees for calculations.
91
+ Positive values for North, negative for South. Defaults to 51.4769 (Greenwich).
92
+ lng (float, optional): Geographic longitude in decimal degrees for calculations.
93
+ Positive values for East, negative for West. Defaults to 0.0005 (Greenwich).
94
+ tz_str (str, optional): Timezone identifier (e.g., "Europe/London", "America/New_York").
95
+ Defaults to "Etc/UTC".
96
+ is_dst (bool, optional): Whether daylight saving time is active for the location.
97
+ Only relevant for certain timezone calculations. Defaults to False.
98
+ zodiac_type (ZodiacType, optional): The zodiac system to use (tropical or sidereal).
99
+ Defaults to DEFAULT_ZODIAC_TYPE.
100
+ sidereal_mode (Union[SiderealMode, None], optional): The sidereal calculation mode
101
+ if using sidereal zodiac. Only applies when zodiac_type is sidereal.
102
+ Defaults to None.
103
+ houses_system_identifier (HousesSystemIdentifier, optional): The house system
104
+ for astrological house calculations (e.g., Placidus, Koch, Equal).
105
+ Defaults to DEFAULT_HOUSES_SYSTEM_IDENTIFIER.
106
+ perspective_type (PerspectiveType, optional): The calculation perspective
107
+ (geocentric, heliocentric, etc.). Defaults to DEFAULT_PERSPECTIVE_TYPE.
108
+ max_days (Union[int, None], optional): Maximum number of daily data points allowed.
109
+ Set to None to disable this safety check. Defaults to 730 (2 years).
110
+ max_hours (Union[int, None], optional): Maximum number of hourly data points allowed.
111
+ Set to None to disable this safety check. Defaults to 8760 (1 year).
112
+ max_minutes (Union[int, None], optional): Maximum number of minute-interval data points.
113
+ Set to None to disable this safety check. Defaults to 525600 (1 year).
114
+
115
+ Raises:
116
+ ValueError: If step_type is not one of "days", "hours", or "minutes".
117
+ ValueError: If the calculated number of data points exceeds the respective maximum limit.
118
+ ValueError: If no valid dates are generated from the input parameters.
119
+
120
+ Examples:
121
+ Create daily ephemeris data for a month:
122
+
123
+ >>> from datetime import datetime
124
+ >>> start = datetime(2024, 1, 1)
125
+ >>> end = datetime(2024, 1, 31)
126
+ >>> factory = EphemerisDataFactory(start, end)
127
+ >>> data = factory.get_ephemeris_data()
128
+
129
+ Create hourly data for a specific location:
130
+
131
+ >>> factory = EphemerisDataFactory(
132
+ ... start, end,
133
+ ... step_type="hours",
134
+ ... lat=40.7128, # New York
135
+ ... lng=-74.0060,
136
+ ... tz_str="America/New_York"
137
+ ... )
138
+ >>> subjects = factory.get_ephemeris_data_as_astrological_subjects()
139
+
140
+ Note:
141
+ Large date ranges with small step intervals can generate thousands of data points,
142
+ which may require significant computation time and memory. The factory includes
143
+ warnings for calculations exceeding 1000 data points and enforces maximum limits
144
+ to prevent system overload.
145
+ """
146
+
147
+ def __init__(
148
+ self,
149
+ start_datetime: datetime,
150
+ end_datetime: datetime,
151
+ step_type: Literal["days", "hours", "minutes"] = "days",
152
+ step: int = 1,
153
+ lat: float = 51.4769,
154
+ lng: float = 0.0005,
155
+ tz_str: str = "Etc/UTC",
156
+ is_dst: bool = False,
157
+ zodiac_type: ZodiacType = DEFAULT_ZODIAC_TYPE,
158
+ sidereal_mode: Union[SiderealMode, None] = None,
159
+ houses_system_identifier: HousesSystemIdentifier = DEFAULT_HOUSES_SYSTEM_IDENTIFIER,
160
+ perspective_type: PerspectiveType = DEFAULT_PERSPECTIVE_TYPE,
161
+ max_days: Union[int, None] = 730,
162
+ max_hours: Union[int, None] = 8760,
163
+ max_minutes: Union[int, None] = 525600,
164
+ ):
165
+ self.start_datetime = start_datetime
166
+ self.end_datetime = end_datetime
167
+ self.step_type = step_type
168
+ self.step = step
169
+ self.lat = lat
170
+ self.lng = lng
171
+ self.tz_str = tz_str
172
+ self.is_dst = is_dst
173
+ self.zodiac_type = normalize_zodiac_type(zodiac_type)
174
+ self.sidereal_mode = sidereal_mode
175
+ self.houses_system_identifier = houses_system_identifier
176
+ self.perspective_type = perspective_type
177
+ self.max_days = max_days
178
+ self.max_hours = max_hours
179
+ self.max_minutes = max_minutes
180
+
181
+ self.dates_list = []
182
+ if self.step_type == "days":
183
+ self.dates_list = [self.start_datetime + timedelta(days=i * self.step) for i in range((self.end_datetime - self.start_datetime).days // self.step + 1)]
184
+ if max_days and (len(self.dates_list) > max_days):
185
+ raise ValueError(f"Too many days: {len(self.dates_list)} > {self.max_days}. To prevent this error, set max_days to a higher value or reduce the date range.")
186
+
187
+ elif self.step_type == "hours":
188
+ hours_diff = (self.end_datetime - self.start_datetime).total_seconds() / 3600
189
+ self.dates_list = [self.start_datetime + timedelta(hours=i * self.step) for i in range(int(hours_diff) // self.step + 1)]
190
+ if max_hours and (len(self.dates_list) > max_hours):
191
+ raise ValueError(f"Too many hours: {len(self.dates_list)} > {self.max_hours}. To prevent this error, set max_hours to a higher value or reduce the date range.")
192
+
193
+ elif self.step_type == "minutes":
194
+ minutes_diff = (self.end_datetime - self.start_datetime).total_seconds() / 60
195
+ self.dates_list = [self.start_datetime + timedelta(minutes=i * self.step) for i in range(int(minutes_diff) // self.step + 1)]
196
+ if max_minutes and (len(self.dates_list) > max_minutes):
197
+ raise ValueError(f"Too many minutes: {len(self.dates_list)} > {self.max_minutes}. To prevent this error, set max_minutes to a higher value or reduce the date range.")
198
+
199
+ else:
200
+ raise ValueError(f"Invalid step type: {self.step_type}")
201
+
202
+ if not self.dates_list:
203
+ raise ValueError("No dates found. Check the date range and step values.")
204
+
205
+ if len(self.dates_list) > 1000:
206
+ logging.warning(f"Large number of dates: {len(self.dates_list)}. The calculation may take a while.")
207
+
208
+ def get_ephemeris_data(self, as_model: bool = False) -> list:
209
+ """
210
+ Generate ephemeris data for the specified date range.
211
+
212
+ This method creates a comprehensive dataset containing planetary positions and
213
+ astrological house cusps for each date in the configured time series. The data
214
+ is structured for easy consumption by astrological applications and analysis tools.
215
+
216
+ The returned data includes all available astrological points (planets, asteroids,
217
+ lunar nodes, etc.) as configured by the perspective type, along with complete
218
+ house cusp information for each calculated moment.
219
+
220
+ Args:
221
+ as_model (bool, optional): If True, returns data as validated model instances
222
+ (EphemerisDictModel objects) which provide type safety and validation.
223
+ If False, returns raw dictionary data for maximum flexibility.
224
+ Defaults to False.
225
+
226
+ Returns:
227
+ list: A list of ephemeris data points, where each element represents one
228
+ calculated moment in time. The structure depends on the as_model parameter:
229
+
230
+ If as_model=False (default):
231
+ List of dictionaries with keys:
232
+ - "date" (str): ISO format datetime string (e.g., "2020-01-01T00:00:00")
233
+ - "planets" (list): List of dictionaries, each containing planetary data
234
+ with keys like 'name', 'abs_pos', 'lon', 'lat', 'dist', 'speed', etc.
235
+ - "houses" (list): List of dictionaries containing house cusp data
236
+ with keys like 'name', 'abs_pos', 'lon', etc.
237
+
238
+ If as_model=True:
239
+ List of EphemerisDictModel instances providing the same data
240
+ with type validation and structured access.
241
+
242
+ Examples:
243
+ Basic usage with dictionary output:
244
+
245
+ >>> factory = EphemerisDataFactory(start_date, end_date)
246
+ >>> data = factory.get_ephemeris_data()
247
+ >>> print(f"Sun position: {data[0]['planets'][0]['abs_pos']}")
248
+ >>> print(f"First house cusp: {data[0]['houses'][0]['abs_pos']}")
249
+
250
+ Using model instances for type safety:
251
+
252
+ >>> data_models = factory.get_ephemeris_data(as_model=True)
253
+ >>> first_point = data_models[0]
254
+ >>> print(f"Date: {first_point.date}")
255
+ >>> print(f"Number of planets: {len(first_point.planets)}")
256
+
257
+ Note:
258
+ - The calculation time is proportional to the number of data points
259
+ - For large datasets (>1000 points), consider using the method in batches
260
+ - Planet order and availability depend on the configured perspective type
261
+ - House system affects the house cusp calculations
262
+ - All positions are in the configured zodiac system (tropical/sidereal)
263
+ """
264
+ ephemeris_data_list = []
265
+ for date in self.dates_list:
266
+ subject = AstrologicalSubjectFactory.from_birth_data(
267
+ year=date.year,
268
+ month=date.month,
269
+ day=date.day,
270
+ hour=date.hour,
271
+ minute=date.minute,
272
+ lng=self.lng,
273
+ lat=self.lat,
274
+ tz_str=self.tz_str,
275
+ city="Placeholder",
276
+ nation="Placeholder",
277
+ online=False,
278
+ zodiac_type=self.zodiac_type,
279
+ sidereal_mode=self.sidereal_mode,
280
+ houses_system_identifier=self.houses_system_identifier,
281
+ perspective_type=self.perspective_type,
282
+ is_dst=self.is_dst,
283
+ )
284
+
285
+ houses_list = get_houses_list(subject)
286
+ available_planets = get_available_astrological_points_list(subject)
287
+
288
+ ephemeris_data_list.append({"date": date.isoformat(), "planets": available_planets, "houses": houses_list})
289
+
290
+ if as_model:
291
+ # Type narrowing: at this point, the dict structure matches EphemerisDictModel
292
+ return [EphemerisDictModel(date=data["date"], planets=data["planets"], houses=data["houses"]) for data in ephemeris_data_list] # type: ignore
293
+
294
+ return ephemeris_data_list
295
+
296
+ def get_ephemeris_data_as_astrological_subjects(self, as_model: bool = False) -> List[AstrologicalSubjectModel]:
297
+ """
298
+ Generate ephemeris data as complete AstrologicalSubject instances.
299
+
300
+ This method creates fully-featured AstrologicalSubject objects for each date in the
301
+ configured time series, providing access to all astrological calculation methods
302
+ and properties. Unlike the dictionary-based approach of get_ephemeris_data(),
303
+ this method returns objects with the complete Kerykeion API available.
304
+
305
+ Each AstrologicalSubject instance represents a complete astrological chart for
306
+ the specified moment, location, and calculation settings. This allows direct
307
+ access to methods like get_sun(), get_all_points(), draw_chart(), calculate
308
+ aspects, and all other astrological analysis features.
309
+
310
+ Args:
311
+ as_model (bool, optional): If True, returns AstrologicalSubjectModel instances
312
+ (Pydantic model versions) which provide serialization and validation features.
313
+ If False, returns raw AstrologicalSubject instances with full method access.
314
+ Defaults to False.
315
+
316
+ Returns:
317
+ List[AstrologicalSubjectModel]: A list of AstrologicalSubject or
318
+ AstrologicalSubjectModel instances (depending on as_model parameter).
319
+ Each element represents one calculated moment in time with full
320
+ astrological chart data and methods available.
321
+
322
+ Each subject contains:
323
+ - All planetary and astrological point positions
324
+ - Complete house system calculations
325
+ - Chart drawing capabilities
326
+ - Aspect calculation methods
327
+ - Access to all Kerykeion astrological features
328
+
329
+ Examples:
330
+ Basic usage for accessing individual chart features:
331
+
332
+ >>> factory = EphemerisDataFactory(start_date, end_date)
333
+ >>> subjects = factory.get_ephemeris_data_as_astrological_subjects()
334
+ >>>
335
+ >>> # Access specific planetary data
336
+ >>> sun_data = subjects[0].get_sun()
337
+ >>> moon_data = subjects[0].get_moon()
338
+ >>>
339
+ >>> # Get all astrological points
340
+ >>> all_points = subjects[0].get_all_points()
341
+ >>>
342
+ >>> # Generate chart visualization
343
+ >>> chart_svg = subjects[0].draw_chart()
344
+
345
+ Using model instances for serialization:
346
+
347
+ >>> subjects_models = factory.get_ephemeris_data_as_astrological_subjects(as_model=True)
348
+ >>> # Model instances can be easily serialized to JSON
349
+ >>> json_data = subjects_models[0].model_dump_json()
350
+
351
+ Batch processing for analysis:
352
+
353
+ >>> subjects = factory.get_ephemeris_data_as_astrological_subjects()
354
+ >>> sun_positions = [subj.sun['abs_pos'] for subj in subjects if subj.sun]
355
+ >>> # Analyze sun position changes over time
356
+
357
+ Use Cases:
358
+ - Time-series astrological analysis
359
+ - Planetary motion tracking
360
+ - Aspect pattern analysis over time
361
+ - Chart animation data generation
362
+ - Astrological research and statistics
363
+ - Progressive chart calculations
364
+
365
+ Performance Notes:
366
+ - More computationally intensive than get_ephemeris_data()
367
+ - Each subject performs full astrological calculations
368
+ - Memory usage scales with the number of data points
369
+ - Consider processing in batches for very large date ranges
370
+ - Ideal for comprehensive analysis requiring full chart features
371
+
372
+ See Also:
373
+ get_ephemeris_data(): For lightweight dictionary-based ephemeris data
374
+ AstrologicalSubject: For details on available methods and properties
375
+ """
376
+ subjects_list = []
377
+ for date in self.dates_list:
378
+ subject = AstrologicalSubjectFactory.from_birth_data(
379
+ year=date.year,
380
+ month=date.month,
381
+ day=date.day,
382
+ hour=date.hour,
383
+ minute=date.minute,
384
+ lng=self.lng,
385
+ lat=self.lat,
386
+ tz_str=self.tz_str,
387
+ city="Placeholder",
388
+ nation="Placeholder",
389
+ online=False,
390
+ zodiac_type=self.zodiac_type,
391
+ sidereal_mode=self.sidereal_mode,
392
+ houses_system_identifier=self.houses_system_identifier,
393
+ perspective_type=self.perspective_type,
394
+ is_dst=self.is_dst,
395
+ )
396
+
397
+ if as_model:
398
+ subjects_list.append(subject)
399
+ else:
400
+ subjects_list.append(subject)
401
+
402
+ return subjects_list
403
+
404
+
405
+ if __name__ == "__main__":
406
+ start_date = datetime.fromisoformat("2020-01-01")
407
+ end_date = datetime.fromisoformat("2020-01-03")
408
+
409
+ factory = EphemerisDataFactory(
410
+ start_datetime=start_date,
411
+ end_datetime=end_date,
412
+ step_type="minutes",
413
+ step=60, # One hour intervals to make the example more manageable
414
+ lat=37.9838,
415
+ lng=23.7275,
416
+ tz_str="Europe/Athens",
417
+ is_dst=False,
418
+ max_hours=None,
419
+ max_minutes=None,
420
+ max_days=None,
421
+ )
422
+
423
+ # Test original method
424
+ ephemeris_data = factory.get_ephemeris_data(as_model=True)
425
+ print(f"Number of ephemeris data points: {len(ephemeris_data)}")
426
+ print(f"First data point date: {ephemeris_data[0].date}")
427
+
428
+ # Test new method
429
+ subjects = factory.get_ephemeris_data_as_astrological_subjects()
430
+ print(f"Number of astrological subjects: {len(subjects)}")
431
+ print(f"First subject sun position: {subjects[0].sun}")
432
+
433
+ # Example of accessing more data from the first subject
434
+ first_subject = subjects[0]
435
+ if first_subject.sun is not None:
436
+ print(f"Sun sign: {first_subject.sun['sign']}")
437
+
438
+ # Compare sun positions from both methods
439
+ for i in range(min(3, len(subjects))):
440
+ print(f"Date: {ephemeris_data[i].date}")
441
+ if len(ephemeris_data[i].planets) > 0:
442
+ print(f"Sun position from dict: {ephemeris_data[i].planets[0]['abs_pos']}")
443
+ print("---")