Skip to content

Stellium v0.15.0: Vectors, Ba Zi and Timelines

Choose a tag to compare

@katelouie katelouie released this 05 Jan 23:43
· 61 commits to main since this release

Stellium 0.15.0 is a release that expands the library's scope in two directions: forward into Machine Learning and eastward into Chinese Metaphysics.

This update introduces a native Vector Embedding engine for charts (enabling O(1) similarity search and ML pipeline integration) and a fully-featured BaZi (Four Pillars) engine with Ten Gods analysis and rich visualization. On the Western front (ha), I've added professional-grade visualizations for Zodiacal Releasing timelines and spiraling Profection Wheels, along with a full GUI Planner in the webapp.

Machine Learning & Analysis

  • Chart Vector Embeddings: New stellium.analysis.vector module to transform charts into dense, fixed-length NumPy arrays.
  • Cyclic Encoding: Uses sin/cos pairs for all 360° positions to preserve geometric continuity.
  • Similarity Search: Includes cosine similarity functions to instantly find similar charts or transits.
  • ML Ready: Perfect for clustering, pattern recognition models, or recommender backends.
from stellium.analysis.vector import ChartVectorizer

# Transform charts into math
vectorizer = ChartVectorizer(include_speed=True)
vec_a = vectorizer.encode(chart_a)
vec_b = vectorizer.encode(chart_b)

# Find similarity (-1.0 to 1.0)
print(f"Similarity: {vectorizer.similarity(vec_a, vec_b):.3f}")

Chinese Astrology (BaZi)

A complete engine for Four Pillars of Destiny calculation and analysis (stellium.chinese).

  • Core Engine: Calculates Pillars based on exact Solar Terms (Jie Qi) and solar longitudes.
  • Deep Analysis: Full Ten Gods (十神) implementation, including hidden stems (Ben Qi, Zhong Qi, Yu Qi) and interaction analysis.
  • Renderers: Includes BaziRichRenderer for beautiful terminal output, plus SVG and prose options.
from stellium.chinese.bazi import BaZiEngine, BaziRichRenderer

# Calculate & Render in Terminal
chart = BaZiEngine().calculate(datetime.now())
BaziRichRenderer().print_chart(chart)

Advanced Visualization

  • Zodiacal Releasing Timelines: New Honeycomb-style stacked timeline visualizations. Shows peak periods (L1/L2/L3) with characteristic slopes and highlighting for "Loosing of the Bond."
  • Profection Wheels: A new visualization for Annual Profections, featuring a spiraling age-ring design (ages 0-95) that visually maps the movement of the Time Lord through the houses.

Webapp

  • Planner GUI: Added a full /planner interface to the web application. Users can now generate the PDF Astrological Planner via a friendly UI with options for page size (A4/A5/Letter), custom date ranges, and modular content toggles.

Improvements & Refactors

  • Layer Architecture: The stellium.visualization.layers module has been refactored into a clean sub-package structure (layers/planets, layers/zodiac, etc.) for better maintainability. Fully backward compatible.
  • Page Sizes: Added native support for A5 page sizes in the Planner and Report builders.

For full details, see the CHANGELOG.