astrorigin / pyswisseph

Python extension to the Swiss Ephemeris
https://astrorigin.com/pyswisseph
GNU Affero General Public License v3.0
237 stars 65 forks source link

Regression bug: swe.SIDM_TRUE_CITRA returning zero ayanAmsha #34

Closed vvasuki closed 4 years ago

vvasuki commented 4 years ago

Code:

    swe.set_sid_mode(swe.SIDM_TRUE_CITRA)
    from jyotisha.panchangam.spatio_temporal import City
    # city = City.from_address_and_timezone('Cupertino, CA', "America/Los_Angeles")
    # jd = city.local_time_to_julian_day(year=2018, month=11, day=11, hours=6, minutes=0, seconds=0)
    assert swe.get_ayanamsa(2458434.083333251) == 24.120535828308334

Output:

E       assert 0.0 == 24.120535828308334
vvasuki commented 4 years ago

https://groups.io/g/swisseph/message/8597 seems to be the culprit here.

karthikraman commented 4 years ago

Is this now fixed?

astrorigin commented 4 years ago

Mentioned issue has been closed by "sanskrit coders".

Next time, please provide a short (as in shortest) code to reproduce the bug. Thanks in advance.

karthikraman commented 4 years ago
In [1]: import swisseph as swe

In [2]: swe.set_sid_mode(swe.SIDM_TRUE_CITRA)

In [3]: swe.get_ayanamsa(2459100)
Out[3]: 0.0
vvasuki commented 4 years ago

Next time, please provide a short (as in shortest) code to reproduce the bug. Thanks in advance.

Didn't I do that in my first post satisfactorily? (Oh I suppose that the example should have been 2 lines instead of 5 lines?)

Mentioned issue has been closed by "sanskrit coders".

This issue was mentioned in https://github.com/sanskrit-coders/jyotisha/issues/40 , rather than other way around (Github automatically adds a notification). None of my posts in this thread mentioned any issue in any other github repository.

astrorigin commented 4 years ago

If that is a swisseph bug, you can replace the corresponding files in libswe/ with the latest version, and recompile, until we update to 2.09.

astrorigin commented 4 years ago
In [1]: import swisseph as swe

In [2]: swe.set_sid_mode(swe.SIDM_TRUE_CITRA)

In [3]: swe.get_ayanamsa(2459100)
Out[3]: 0.0

Finally.

Thank you :)