|
@@ -387,9 +387,9 @@ def get_sky_state(
|
|
|
"""
|
|
"""
|
|
|
Return a consolidated raw sky-state snapshot for downstream chart engines.
|
|
Return a consolidated raw sky-state snapshot for downstream chart engines.
|
|
|
|
|
|
|
|
- This stays purely descriptive: it combines the core astronomical outputs
|
|
|
|
|
- already exposed elsewhere in the server without adding signs, houses, or
|
|
|
|
|
- interpretation.
|
|
|
|
|
|
|
+ Combines planetary positions, lunar state, sidereal time, and solar events
|
|
|
|
|
+ into a single response. Optionally includes house cusps and angles when
|
|
|
|
|
+ a house system is specified.
|
|
|
|
|
|
|
|
Args:
|
|
Args:
|
|
|
datetime: ISO 8601 datetime (UTC). Defaults to now.
|
|
datetime: ISO 8601 datetime (UTC). Defaults to now.
|
|
@@ -397,16 +397,15 @@ def get_sky_state(
|
|
|
lon: Observer longitude in decimal degrees.
|
|
lon: Observer longitude in decimal degrees.
|
|
|
elevation: Observer elevation in meters.
|
|
elevation: Observer elevation in meters.
|
|
|
geocentric: If True, return geocentric positions instead of topocentric.
|
|
geocentric: If True, return geocentric positions instead of topocentric.
|
|
|
- house_system: Optional house system code. When provided, includes house
|
|
|
|
|
- cusps and angles in the response. Supported codes:
|
|
|
|
|
- 'P' = Placidus, 'K' = Koch, 'E' = Equal, 'W' = Whole Sign,
|
|
|
|
|
- 'A' = Alcabitius, 'C' = Campanus, 'M' = Morinus, 'R' = Porphyry,
|
|
|
|
|
- 'T' = Polich/Page, 'U' = Krusinski-Pisa, 'V' = Vehlow Equal,
|
|
|
|
|
- 'X' = Meridian, 'Y' = Horizontal, 'H' = Azimuthal, 'B' = Alcabitius,
|
|
|
|
|
- 'O' = Equal/MC, 'F' = Carter poli-eq, 'D' = Equal from 15° Aries,
|
|
|
|
|
- 'G' = Gauquelin sectors, 'I' = Sunshine, 'J' = Sunshine alt,
|
|
|
|
|
- 'L' = Pullen SD, 'N' = Equal/1, 'Q' = Pullen SR, 'S' = Sripati,
|
|
|
|
|
- 'Z' = APC houses.
|
|
|
|
|
|
|
+ house_system: Optional house system code (single uppercase letter).
|
|
|
|
|
+ When provided, includes 'houses' key with cusps and angles.
|
|
|
|
|
+ Supported: P=Placidus, K=Koch, E=Equal, W=Whole Sign,
|
|
|
|
|
+ A=Alcabitius, C=Campanus, M=Morinus, R=Porphyry,
|
|
|
|
|
+ T=Polich/Page, U=Krusinski-Pisa, V=Vehlow Equal,
|
|
|
|
|
+ X=Meridian, Y=Horizontal, H=Azimuthal, O=Equal/MC,
|
|
|
|
|
+ F=Carter poli-eq, D=Equal from 15° Aries, G=Gauquelin sectors,
|
|
|
|
|
+ I=Sunshine, J=Sunshine alt, L=Pullen SD, N=Equal/1,
|
|
|
|
|
+ Q=Pullen SR, S=Sripati, Z=APC houses.
|
|
|
"""
|
|
"""
|
|
|
lat, lon = _default_location(lat, lon)
|
|
lat, lon = _default_location(lat, lon)
|
|
|
date = _utc_date_from_datetime(datetime)
|
|
date = _utc_date_from_datetime(datetime)
|
|
@@ -469,7 +468,8 @@ def get_sky_state(
|
|
|
|
|
|
|
|
# Compute house cusps when requested
|
|
# Compute house cusps when requested
|
|
|
if house_system is not None:
|
|
if house_system is not None:
|
|
|
- hs_code = house_system.upper().encode()
|
|
|
|
|
|
|
+ hs_code = house_system.upper().encode()[:1]
|
|
|
|
|
+ logger.info(f"house_system={house_system!r} hs_code={hs_code!r} type={type(hs_code)}")
|
|
|
try:
|
|
try:
|
|
|
cusps, ascmc = swe.houses(jd, lat, lon, hs_code)
|
|
cusps, ascmc = swe.houses(jd, lat, lon, hs_code)
|
|
|
houses = []
|
|
houses = []
|