-
Notifications
You must be signed in to change notification settings - Fork 19
/
demo_custom_ayanamsa.py
41 lines (30 loc) · 1.38 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
import VedAstro # install via pip
from VedAstro.Library import * # reference full library
#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.YearOfCoincidence = int(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.YearOfCoincidence = int(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}")