-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathdemo_custom_ayanamsa.py
43 lines (31 loc) · 1.42 KB
/
demo_custom_ayanamsa.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from vedastro import * # install via pip
# PART 0 : Set API key
Calculate.SetAPIKey('FreeAPIUser') # ⚡ unlimited speed API key from "vedastro.org/Account"
#PART 1 : PREPARE NEEDED DATA
#-----------------------------------
# set birth location
geolocation = GeoLocation("Tokyo, Japan", 139.83, 35.65)
# group all birth time data together
birth_time = Time("23:40 31/12/2010 +08:00", geolocation)
#PART 2 : SET CUSTOM AYANAMSA
# note : must be set before making calling calculator
#-----------------------------------
print(f"LAHIRI AYANAMSA : 285 AD")
Calculate.Ayanamsa = Ayanamsa.Lahiri
#PART 3 : MAKE CALCULATION
#-----------------------------------
moon_constellation = Calculate.PlanetConstellation(birth_time, PlanetName.Sun)
planet_longitude = Calculate.PlanetNirayanaLongitude(birth_time, PlanetName.Sun)
print(f"Sun Constellation : {moon_constellation}")
print(f"Nirayana Longitude : {planet_longitude}")
#PART 4 : CHANGE CUSTOM AYANAMSA
# note : must be set before making calling calculator
#-----------------------------------
print(f"\nRAMAN AYANAMSA : 397 AD")
Calculate.Ayanamsa = Ayanamsa.Raman
#PART 5 : MAKE CALCULATION
#-----------------------------------
moon_constellation = Calculate.PlanetConstellation(birth_time, PlanetName.Sun)
planet_longitude = Calculate.PlanetNirayanaLongitude(birth_time, PlanetName.Sun)
print(f"Sun Constellation : {moon_constellation}")
print(f"Nirayana Longitude : {planet_longitude}")