jyotisham / jyotisha

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

Including angas that end just before sunrise #126

Closed karthikraman closed 2 years ago

karthikraman commented 2 years ago

DailyPanchaanga.sunrise_day_angas (obviously) starts only at sunrise. Given the practical purpose of the panchaanga, it would be useful to list angas that end anytime after brAhma muhUrta but before sunrise. These angas can be included on adjacent days. e.g. Ashvini -> 28:30* on Day -1, and Ashvini -> 4:30 on Day 0. (This is for simplifying snana sankalpa or other early karma sankalpas where one has to refer to previous calendar day's angas rather than current, and may occasionally miss out).

How best to implement this? Altering sunrise_day_angas is possible but may not be the best way. Creating DailyPanchaanga.braahma_sunrise_days_angas (or something better worded) might be more correct, but might involve too much additional computation.

Thoughts?

vvasuki commented 2 years ago

This looks like a presentation (not calculation or data structuring) issue to me - so the texwriter method should be suitably altered. The day-panchaanga object itself should remain as it is, and pre-sunrise panchAnga details should continue be included in the previous-day-panchAnga.

karthikraman commented 2 years ago

Fair enough, let me try it out. The other solution seemed easier as it just involves altering the interval in DayPanchaanga, but you're very right.