Exemple #1
0
def sidereal_lunar_longitude(tee):
    """Return sidereal lunar longitude at moment, tee."""
    return mod(Lunar.lunar_longitude(tee) - Astro.precession(tee) + SIDEREAL_START, 360)
Exemple #2
0
    return ifloor(mod((HinduSolarDate.longitude(date) + HinduLunarDate.longitude(date)) / angle(0, 800, 0), 27)) + 1

def sacred_wednesdays(g_year):
    """Return the list of Wednesdays in Gregorian year, g_year,
    that are day 8 of Hindu lunar months."""
    return sacred_wednesdays_in_range(GregorianDate.year_range(g_year))

def sacred_wednesdays_in_range(range):
    """Return the list of Wednesdays within range of dates
    that are day 8 of Hindu lunar months."""
    a      = range[0]
    b      = range[1]
    wed    = DayOfWeek.Wednesday.on_or_after(a)
    h_date = HinduLunarDate.from_fixed(wed)
    ell  = [wed] if (h_date.day == 8) else []
    if is_in_range(wed, range):
        ell[:0] = sacred_wednesdays_in_range([wed + 1, b])
        return ell
    else:
        return []

SIDEREAL_START = Astro.precession(HinduDate.UJJAIN.universal_from_local(mesha_samkranti(JulianDate.ce(285))))

def sidereal_solar_longitude(tee):
    """Return sidereal solar longitude at moment, tee."""
    return mod(Solar.solar_longitude(tee) - Astro.precession(tee) + SIDEREAL_START, 360)

def sidereal_lunar_longitude(tee):
    """Return sidereal lunar longitude at moment, tee."""
    return mod(Lunar.lunar_longitude(tee) - Astro.precession(tee) + SIDEREAL_START, 360)