API Reference: Ayanamsa Module
AyanamsaSystem Type
AyanamsaSystem = Literal['lahiri', 'raman', 'kali', 'krishnamurti_new', 'krishnamurti_old', 'fagan_bradley', 'janma', 'true', 'madhava', 'vishnu', 'yukteshwar', 'suryasiddhanta', 'aryabhatta', 'ushashasi', 'true_citra', 'true_revati', 'true_pusya']
module-attribute
Functions
ayanamsa
Ayanamsa calculation functions for Vedic astrology.
This module provides functions to calculate various ayanamsa (precession correction) values used in Vedic astrology, including: - Lahiri, Raman, Krishnamurti, Fagan-Bradley ayanamsas - Traditional systems: Kali, Janma, Yukteshwar, Suryasiddhanta, Aryabhatta - Star-based systems: True Citra, True Revati, True Pusya - Other systems: Madhava, Vishnu, Ushashasi, and True ayanamsa
Each function calculates the ayanamsa for a given date using a quadratic formula based on Julian centuries from the J2000.0 epoch.
get_ayanamsa(date, system)
Calculate the ayanamsa for a given date and system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
datetime
|
The date for which to calculate the ayanamsa. |
required |
system
|
AyanamsaSystem
|
The ayanamsa system to use. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The calculated ayanamsa in degrees. |