Exemplo n.º 1
0
 def get_offset(self, jd):
     if self.ayanaamsha_id == Ayanamsha.VERNAL_EQUINOX_AT_0:
         return 0
     elif self.ayanaamsha_id == Ayanamsha.CHITRA_AT_180:
         # TODO: The below fails due to https://github.com/astrorigin/pyswisseph/issues/35
         from jyotisha.panchaanga.temporal import body
         return body.get_star_longitude(star="Spica", jd=jd) - 180
     elif self.ayanaamsha_id == Ayanamsha.ASHVINI_STARTING_0:
         return 0
     elif self.ayanaamsha_id == Ayanamsha.RASHTRIYA_PANCHANGA_NAKSHATRA_TRACKING:
         swe.set_sid_mode(swe.SIDM_LAHIRI)
         return swe.get_ayanamsa_ut(jd)
     raise Exception("Bad ayanamsha_id")
Exemplo n.º 2
0
def test_get_star_longitude():
    assert body.get_star_longitude(star="Spica",
                                   jd=2458434.083333251) == 204.09485939669307