aetherfield 0.2.0__tar.gz → 0.2.2__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.
- {aetherfield-0.2.0/src/aetherfield.egg-info → aetherfield-0.2.2}/PKG-INFO +1 -1
- {aetherfield-0.2.0 → aetherfield-0.2.2}/pyproject.toml +1 -1
- {aetherfield-0.2.0 → aetherfield-0.2.2}/src/aetherfield/core.py +21 -17
- {aetherfield-0.2.0 → aetherfield-0.2.2/src/aetherfield.egg-info}/PKG-INFO +1 -1
- {aetherfield-0.2.0 → aetherfield-0.2.2}/LICENSE +0 -0
- {aetherfield-0.2.0 → aetherfield-0.2.2}/README.md +0 -0
- {aetherfield-0.2.0 → aetherfield-0.2.2}/setup.cfg +0 -0
- {aetherfield-0.2.0 → aetherfield-0.2.2}/src/aetherfield/__init__.py +0 -0
- {aetherfield-0.2.0 → aetherfield-0.2.2}/src/aetherfield/cli/benchmark.py +0 -0
- {aetherfield-0.2.0 → aetherfield-0.2.2}/src/aetherfield/cli/calibrate_all.py +0 -0
- {aetherfield-0.2.0 → aetherfield-0.2.2}/src/aetherfield/cli/compare.py +0 -0
- {aetherfield-0.2.0 → aetherfield-0.2.2}/src/aetherfield/iplocal.py +0 -0
- {aetherfield-0.2.0 → aetherfield-0.2.2}/src/aetherfield.egg-info/SOURCES.txt +0 -0
- {aetherfield-0.2.0 → aetherfield-0.2.2}/src/aetherfield.egg-info/dependency_links.txt +0 -0
- {aetherfield-0.2.0 → aetherfield-0.2.2}/src/aetherfield.egg-info/entry_points.txt +0 -0
- {aetherfield-0.2.0 → aetherfield-0.2.2}/src/aetherfield.egg-info/requires.txt +0 -0
- {aetherfield-0.2.0 → aetherfield-0.2.2}/src/aetherfield.egg-info/top_level.txt +0 -0
|
@@ -29,6 +29,16 @@ bodies = ['sun','moon','mercury','venus','mars','jupiter','saturn']
|
|
|
29
29
|
# Mean regression of lunar nodes (~18.6 year cycle)
|
|
30
30
|
DRACONIC_RATE_DEG_PER_DAY = -360.0 / (18.612958 * 365.2422)
|
|
31
31
|
|
|
32
|
+
SIGNS = [
|
|
33
|
+
"Aries", "Taurus", "Gemini", "Cancer", "Leo",
|
|
34
|
+
"Virgo", "Libra", "Scorpio", "Sagittarius",
|
|
35
|
+
"Capricorn", "Aquarius", "Pisces"
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
AGE_LENGTH = 2147.67
|
|
39
|
+
|
|
40
|
+
ANCHOR_YEAR = 1
|
|
41
|
+
ANCHOR_SIGN = "Pisces"
|
|
32
42
|
|
|
33
43
|
def _wrap_deg(x: float) -> float:
|
|
34
44
|
return x % 360.0
|
|
@@ -167,31 +177,25 @@ try:
|
|
|
167
177
|
except Exception:
|
|
168
178
|
SKYFIELD_OK = False
|
|
169
179
|
|
|
170
|
-
|
|
171
|
-
("Taurus", -4300, -2150),
|
|
172
|
-
("Aries", -2150, 1),
|
|
173
|
-
("Pisces", 1, 2150),
|
|
174
|
-
("Aquarius", 2150, 4300),
|
|
175
|
-
]
|
|
180
|
+
|
|
176
181
|
|
|
177
182
|
def get_age_sign(year: int) -> str:
|
|
178
|
-
for sign, start, end in AGES:
|
|
179
|
-
if start <= year < end:
|
|
180
|
-
return sign
|
|
181
|
-
return "Pisces" # fallback default
|
|
182
183
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
184
|
+
|
|
185
|
+
offset_years = year - ANCHOR_YEAR
|
|
186
|
+
age_index_offset = offset_years // AGE_LENGTH
|
|
187
|
+
|
|
188
|
+
anchor_index = SIGNS.index(ANCHOR_SIGN)
|
|
189
|
+
sign_index = (anchor_index + age_index_offset) % 12
|
|
190
|
+
|
|
191
|
+
return SIGNS[sign_index]
|
|
189
192
|
|
|
190
193
|
def rotated_zodiac(start_sign: str) -> list[str]:
|
|
191
194
|
i = SIGNS.index(start_sign)
|
|
192
195
|
return SIGNS[i:] + SIGNS[:i]
|
|
193
196
|
|
|
194
197
|
def get_zodiac_by_longitude_dt(longitude: float, dt: datetime) -> str:
|
|
198
|
+
dt = _as_datetime(dt)
|
|
195
199
|
year = dt.year
|
|
196
200
|
age_sign = get_age_sign(year)
|
|
197
201
|
signs = rotated_zodiac(age_sign)
|
|
@@ -490,7 +494,7 @@ def _as_datetime(dt_or_mt: Any) -> datetime:
|
|
|
490
494
|
return dt_or_mt
|
|
491
495
|
to_dt = getattr(dt_or_mt, 'to_datetime', None)
|
|
492
496
|
if callable(to_dt):
|
|
493
|
-
dt =
|
|
497
|
+
dt = to_dt()
|
|
494
498
|
if not isinstance(dt, datetime):
|
|
495
499
|
raise TypeError("to_datetime() did not return a datetime")
|
|
496
500
|
return dt
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|