Closed must-be-rohit closed 1 month ago
After studying the code got the parameter zodiac_type="Sidereal" under AstrologicalSubject() that can be used to change the calculations. Even after changing the type, the planet positions do not match with the positions provided by astrology software.
How to use this mode from the main swisseph
swe.set_sid_mode(swe.SIDM_LAHIRI)
While studying the code further I got to the module astrological_subject and the SIDM flag is not set to LAHIRI due to which certain calculations for sidereal are incorrect.
def _planets_degrees_lister(self): """Sidereal or tropic mode.""" self._iflag = swe.FLG_SWIEPH + swe.FLG_SPEED
if self.zodiac_type == "Sidereal":
self._iflag += swe.FLG_SIDEREAL
**#mode = "SIDM_FAGAN_BRADLEY"
mode = "SIDM_LAHIRI"**
swe.set_sid_mode(getattr(swe, mode))
Possible to rollout a fix for this?
Hi, thank you for pointing out that problem, if you submit a pull request with the fix I'll be glad to integrate your code!
I just created the pull request with the update, if you can verify and merge
I have to take a better look at it, this pull request makes "SIDM_LAHIRI" the default, the best option would be to create another kwarg to the AstrologicalSubject class
@must-be-rohit I updated the AstrologicalSubject class to have the possibility to set a sidereal mode (Ayanamsa), here a code snippet as example:
johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")
Let me know if it works!
Hello, What is the way to convert the zodiac calculations from Tropic to Sidereal print(Kundali.zodiac_type) Tropic