Closed supriyagl closed 3 years ago
swe.set_sid_mode(swe.SIDM_TRUE_CITRA,0,0)
ayan = swe.get_ayanamsa_ut(pJd)
print("ayan ",ayan)
print("JD", jd)
Output:
ayan 24.158044276445253
JD 2459683.5
Don't see any issue with the code. works perfectly fine for me. Maybe some path issue, try adding 'swe.set_ephe_path('C:\SWEPH\EPHE')' before the function call
I cannot reproduce that bug. Do you have more information about your system, and a complete script to reproduce the bug?
Hello,
Please find the complete code:
import swisseph as swe import math from datetime import timedelta import julian
import os, sys print( "Current directory (sys): ",sys.path[0]) ephemerisPath =os.getcwd()+'\bhavishya\ephe' print(ephemerisPath) swe.set_ephe_path(ephemerisPath) dob_utc = swe.utc_time_zone(1979,4,2,0,0,1,5.5) dob_t_utc = dob_utc[3]+dob_utc[4]/60+dob_utc[5]/3600
jd = swe.julday(dob_utc[0],dob_utc[1],dob_utc[2],dob_t_utc,swe.GREG_CAL)
lon = 74+(39/60) lat = 19+(27/60)
swe.set_topo(lon,lat)
swe.set_sid_mode(swe.SIDM_LAHIRI, 0.0, 0.0) ayan = swe.get_ayanamsa_ut(jd) print("ayan1 ",ayan)
swe.set_sid_mode(swe.SIDM_TRUE_CITRA,0,0) ayan = swe.get_ayanamsa_ut(jd) print("ayan2 ",ayan)
Output: Current directory (sys): C:\Learn\Astro Software2 C:\Learn\Astro Software2\bhavishya\ephe ayan1 23.567182650108066 ayan2 0.0
It works for Lahiri and a few more ayanas. So I do not think that there is any problem with the code. It does not work only for True Chitra ayanamsa (SIDM_TRUE_CITRA)
I cannot reproduce that bug. Do you have more information about your system, and a complete script to reproduce the bug?
I am using Windows 10 pro. Please let me know if you need any other information.
I cant reproduce that bug.
This is what I get:
Traceback (most recent call last):
File "ayantest.py", line 7, in <module>
import julian
ModuleNotFoundError: No module named 'julian'
Let's comment out that line, then I get:
Current directory (sys): /home/stan/pyswisseph
/home/stan/pyswissephavishya\ephe
ayan1 23.567221048702663
ayan2 23.557287465243917
What is your software version?
Please try with cloning this repository, maybe that will help.
Whenever I use true Chitra Paksha, ayanamsa is calculated incorrectly. My code is as follows: swe.set_sid_mode(swe.SIDM_TRUE_CITRA,0,0) ayan = swe.get_ayanamsa_ut(jd) print("ayan ",ayan) Output: ayan 0.0
Please note that it is working fine for Lahiri ayanamsa.