jyotisham / jyotisha

Python tools for the astronomical / astrological vedAnga of Hindus
MIT License
92 stars 54 forks source link

Finding Nakshatra birthday in current year #118

Closed sivachandran closed 3 years ago

sivachandran commented 3 years ago

I am able find the Nakshatra for given date of birth using the following snippet

nakshatra = NakshatraDivision(jd, ayanaamsha_id=Ayanamsha.CHITRA_AT_180).get_anga(zodiac.AngaType.NAKSHATRA).index

But I'm not sure how to find Nakshatra/star birthday in the current year. I'm thinking of finding Nakshatra current date/time then increment the hours/days until birth Nakshatra occurs.

Is this the right way to find Nakshatra/star birthday in the current year or is there a better way to do this?

vvasuki commented 3 years ago

Try

  anga_span_finder = AngaSpanFinder.get_cached(ayanaamsha_id=Ayanamsha.CHITRA_AT_180, anga_type=AngaType.NAKSHATRA)
  anga_span = anga_span_finder.get_spans_in_period(jd_start=jd1, jd_end=jd2, target_anga_id=YOUR_NAKSHATRA)