def month_a(self, month: List[BabylonianDay]) -> List[AbstractQuery]: res = [] day14 = SearchRange.for_night(month, 14) # Mercury's last appearance in the east behind Pisces res.append( PlanetaryEventQuery(self.db, MERCURY, InnerPlanetPhenomena.ML, day14)) res.append( AngularSeparationQuery(self.db, MERCURY, PISCES.central_star, 0, PISCES.radius, None, day14)) # Saturn's last appearance behind Pisces res.append( PlanetaryEventQuery(self.db, SATURN, OuterPlanetPhenomena.LA, day14)) res.append( AngularSeparationQuery(self.db, SATURN, PISCES.central_star, 0, PISCES.radius, EclipticPosition.BEHIND, day14)) day17 = SearchRange.for_night(month, 17) # Mars became stationary res.append( PlanetaryEventQuery(self.db, MARS, OuterPlanetPhenomena.ST, day17)) # it came close to the bright star of the Scorpion's head res.append( AngularSeparationQuery(self.db, MARS, ANTARES, 0, 10, None, day17)) return res
def year_37_month_1(self, month: List[BabylonianDay]) -> List[AbstractQuery]: res = [] # Sîn (Moon) appeared behind the Bull of Heaven (Taurus) if self.mode == VAT4956Mode.ALL or self.mode == VAT4956Mode.LUNAR_ONLY: res.append(AngularSeparationQuery(self.db, MOON, TAURUS.central_star, 0, TAURUS.radius, EclipticPosition.BEHIND, SearchRange.for_night(month, 1))) # Kajjamānu (Saturn) was in front of the Swallow (Pisces). if self.mode == VAT4956Mode.ALL or self.mode == VAT4956Mode.PLANET_ONLY: res.append(AngularSeparationQuery(self.db, SATURN, PISCES.central_star, 0, PISCES.radius, EclipticPosition.AHEAD, SearchRange.for_night(month, 1))) # the 9th, beginning of the night, Sîn (Moon) stood 1 cubit in front of the Rear Foot of the Lion (β Virginis). if self.mode == VAT4956Mode.ALL or self.mode == VAT4956Mode.LUNAR_ONLY: res.append(AngularSeparationQuery(self.db, MOON, BETA_VIRGINIS, 1 * CUBIT, 6 * FINGER, EclipticPosition.AHEAD, SearchRange.for_night(month, 9))) # The 11th] or the 12th Sagmegar (Jupiter) ‘rose to daylight’ (AR). if self.mode == VAT4956Mode.ALL or self.mode == VAT4956Mode.PLANET_ONLY: res.append(PlanetaryEventQuery(self.db, JUPITER, OuterPlanetPhenomena.AR, SearchRange.range_of_nights(month, 11, 12))) # NA (sunrise to moonset) was 4. if self.mode == VAT4956Mode.ALL or self.mode == VAT4956Mode.LUNAR_SIX_ONLY: res.append(LunarSixQuery(self.db, month, 14, LunarSix.NA, 4.0)) return res
def year_31_month_unknown( self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 1' [Month XII, ....] # 2' [....] .... # 3' it cleared [from] east to north. # 4' The south wind blew. I cubit # 5' in front of Libra it was eclipsed. # 6' Saturn rose in Capricorn; Mars # 7' was 2 cubits in front of α Scorpii. # 8' At 1,30° after sunset. t = (1 * 60) + 30 range = SearchRange.any_day(month) eclipse_pos = EclipsePosition(LIBRA.central_star, 0, LIBRA.radius, EclipticPosition.AHEAD) eclipse_time = FirstContactTime(t, FirstContactRelative.AFTER_SUNSET) eclipse = LunarEclipseQuery(self.db, eclipse_time, ExpectedEclipseType.PARTIAL_OR_TOTAL, None, eclipse_pos, range) if eclipse.best is not None: eclipse_time = eclipse.best['closest_approach_time'] range = SearchRange(eclipse_time - 1, eclipse_time + 1, "Within a day of the eclipse") mars = AngularSeparationQuery(self.db, MARS, ANTARES, 2 * CUBIT, 1 * CUBIT, EclipticPosition.AHEAD, range) saturn = AngularSeparationQuery(self.db, SATURN, CAPRICORNUS.central_star, 0, CAPRICORNUS.radius, None, range) return [eclipse, mars, saturn]
def month_b(self, month: List[BabylonianDay]) -> List[AbstractQuery]: res = [] day5 = SearchRange.for_night(month, 5) # Mercury's first appearance in the east in Pisces res.append( PlanetaryEventQuery(self.db, MERCURY, InnerPlanetPhenomena.MF, day5)) res.append( AngularSeparationQuery(self.db, MERCURY, PISCES.central_star, 0, PISCES.radius, None, day5)) day19 = SearchRange.for_night(month, 19) # Venus stood in the region of Aries, 10 fingers behind Mars res.append( AngularSeparationQuery(self.db, VENUS, MARS, 10 * FINGER, 10 * FINGER, EclipticPosition.BEHIND, day19)) res.append( AngularSeparationQuery(self.db, MARS, ARIES.central_star, 0, ARIES.radius, None, day19)) day20 = SearchRange.for_night(month, 20) # Mars was 1 finger to the left of the front? of Aries res.append( AngularSeparationQuery(self.db, MARS, ARIES.central_star, 0, ARIES.radius, None, day20)) return res
def year_8_month_5(self, month: List[BabylonianDay]) -> List[AbstractQuery]: res = [] if self.mode == BM33066Mode.ALL or self.mode == BM33066Mode.PLANET_ONLY: res.append(PlanetaryEventQuery(self.db, SATURN, OuterPlanetPhenomena.LA, SearchRange.for_night(month, 29))) res.append(PlanetaryEventQuery(self.db, MARS, OuterPlanetPhenomena.ST, SearchRange.for_night(month, 12))) return res
def year_9_month_2(self, month: List[BabylonianDay]) -> List[AbstractQuery]: res = [] if self.mode == BM33066Mode.ALL or self.mode == BM33066Mode.PLANET_ONLY: res.append(PlanetaryEventQuery(self.db, MARS, OuterPlanetPhenomena.LA, SearchRange.for_night(month, 9))) res.append(AngularSeparationQuery(self.db, MARS, REGULUS, 0, 15, EclipticPosition.BEHIND, SearchRange.for_night(month, 9))) return res
def year_8_month_1(self, month: List[BabylonianDay]) -> List[AbstractQuery]: res = [] if self.mode == BM33066Mode.ALL or self.mode == BM33066Mode.PLANET_ONLY: res.append(PlanetaryEventQuery(self.db, VENUS, InnerPlanetPhenomena.EF, SearchRange.for_night(month, 13))) res.append(AngularSeparationQuery(self.db, VENUS, AURIGA.central_star, 0, AURIGA.radius, None, SearchRange.for_night(month, 13))) return res
def kand_1_iii(self, month: List[BabylonianDay]) -> List[AbstractQuery]: day28 = SearchRange.for_night(month, 28) # Mercury was in the back of Mars? res1 = AngularSeparationQuery(self.db, MERCURY, MARS, 0, 30, EclipticPosition.BEHIND, day28) day29 = SearchRange.for_night(month, 29) # Mercury in the area of the Lion res2 = AngularSeparationQuery(self.db, MERCURY, LEO.central_star, 0, LEO.radius, None, day29) return [res1, res2]
def year_37_month_10(self, month: List[BabylonianDay]) -> List[AbstractQuery]: res = [] # The 19th, Dilbat (Venus) was below the Middle Star of the Horn of the Goat [...] (β Capricorni) if self.mode == VAT4956Mode.ALL or self.mode == VAT4956Mode.PLANET_ONLY: res.append(AngularSeparationQuery(self.db, VENUS, BETA_CAPRICORNI, 0, 15, EclipticPosition.BELOW, SearchRange.for_night(month, 19))) return res
def __init__(self, db: Database, month: List[BabylonianDay], day_number: int, six: LunarSix, value_us: float, low_precision: bool = False): assert value_us >= 0 assert 1 <= day_number <= 30 self.six = six sun_time = month[day_number - 1].sunset if six.contains_sunset() else month[ day_number - 1].sunrise day_str = INFLECT_ENGINE.ordinal(day_number) comment = "Sunset of the {}".format(day_str) if six.contains_sunset( ) else "Sunrise of the {}".format(day_str) self.search_range = SearchRange(sun_time, sun_time, comment) moon_query = RiseSetType.SET if six.lunar_set() else RiseSetType.RISE moon_time = db.nearest_rising_setting(MOON, moon_query, sun_time) actual = moon_time - sun_time if six.sun_first( ) else sun_time - moon_time self.actual_us = actual * 360 self.moon_time = moon_time tolerance = HIGH_TIME_TOLERANCE if low_precision else REGULAR_TIME_TOLERANCE self.score = self.lunar_six_score(self.actual_us, value_us, tolerance)
def year_4_month_4(self, month: List[BabylonianDay]) -> List[AbstractQuery]: range = SearchRange.for_night(month, 29) return [ PlanetaryEventQuery(self.db, SATURN, OuterPlanetPhenomena.LA, range) ]
def year_14_month_6(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 10 [Year 1]4. [Month] VI, [omitted.] return [ LunarEclipseQuery(self.db, None, ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_27_month_3(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 6' Year 27. Month III, (after) 5 (months), omitted. return [ LunarEclipseQuery(self.db, None, ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_7_month_6(self, month: List[BabylonianDay]) -> List[AbstractQuery]: range = SearchRange.x_plus(month, 10) return [ PlanetaryEventQuery(self.db, SATURN, OuterPlanetPhenomena.LA, range) ]
def kand_16_iii(self, month: List[BabylonianDay]) -> List[AbstractQuery]: day20 = SearchRange.for_night(month, 20) # Mercury stood 1 cubit 4 fingers behind Mars. res1 = AngularSeparationQuery(self.db, MERCURY, MARS, (1 * CUBIT + 4 * FINGER), 1 * CUBIT, EclipticPosition.BEHIND, day20) return [res1]
def shamash_19_vii(self, month: List[BabylonianDay]) -> List[AbstractQuery]: day4 = SearchRange.for_night(month, 4) # Mercury stood for ⅔ cubit above? Mars res1 = AngularSeparationQuery(self.db, MERCURY, MARS, (2 / 3 * CUBIT), 1 * CUBIT, EclipticPosition.ABOVE, day4) return [res1]
def year_4_month_7(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 11 Month VII, omitted. return [ LunarEclipseQuery(self.db, None, ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def nabo_7_unknown(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # Mercury was balanced 6 fingers above Mars. res1 = AngularSeparationQuery(self.db, MERCURY, MARS, 6 * FINGER, 6 * FINGER, EclipticPosition.ABOVE, SearchRange.any_day(month)) return [res1]
def year_12_month_a(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 5 Year 12. Month [I, omitted] return [ LunarEclipseQuery(self.db, None, ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_1_month_3(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 1 [Year I of Nebukad]nezar. Month III, omitted. return [ LunarEclipseQuery(self.db, None, ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_17_month_4(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 16 [Year] 17. Month IV, [omitted.] return [ LunarEclipseQuery(self.db, None, ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_26_month_11(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 5' Month XI, omitted. Month XII was intercalary. return [ LunarEclipseQuery(self.db, None, ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_2_month_a(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 3 [Year 2. Month II,] (after) 5? (months), omitted. Month VI was intercalary. return [ LunarEclipseQuery(self.db, None, ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_15_month_5(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 12 [Year 1]5. Month V, [omitt]ed. return [ LunarEclipseQuery(self.db, None, ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_14_month_b(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 11 [Month XII. omitt]ed .... Month XII [was intercalary] return [ LunarEclipseQuery(self.db, None, ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_14_month_a(self, month: List[BabylonianDay]) -> List[AbstractQuery]: range = SearchRange.any_day(month) return [ PlanetaryEventQuery(self.db, SATURN, OuterPlanetPhenomena.LA, range) ]
def year_10_month_8(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 1 Month VIII, [....] .... [....] # 2 It cleared [in the west] and south [....] ⅔ bēru after [sunset?] return [ LunarEclipseQuery(self.db, None, ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_7_month_12(self, month: List[BabylonianDay]) -> List[AbstractQuery]: res = [] if self.mode == BM33066Mode.ALL or self.mode == BM33066Mode.LUNAR_SIX_ONLY: res.append(LunarSixQuery(self.db, month, 1, LunarSix.NA1, 15.5)) res.append(LunarSixQuery(self.db, month, 12, LunarSix.SU2, 10.5)) res.append(LunarSixQuery(self.db, month, 13, LunarSix.ME, 5 + 1/3)) res.append(LunarSixQuery(self.db, month, 14, LunarSix.GI6, 10)) res.append(LunarSixQuery(self.db, month, 25, LunarSix.KUR, 23)) res.append(LunarSixQuery(self.db, month, 27, LunarSix.KUR, 12)) if self.mode == BM33066Mode.ALL or self.mode == BM33066Mode.PLANET_ONLY: res.append(PlanetaryEventQuery(self.db, VENUS, InnerPlanetPhenomena.ML, SearchRange.for_night(month, 7))) res.append(AngularSeparationQuery(self.db, VENUS, PISCES.central_star, 0, PISCES.radius, None, SearchRange.for_night(month, 7))) return res
def year_7_month_2(self, month: List[BabylonianDay]) -> List[AbstractQuery]: res = [] if self.mode == BM33066Mode.ALL or self.mode == BM33066Mode.LUNAR_SIX_ONLY: res.append(LunarSixQuery(self.db, month, 1, LunarSix.NA1, 23)) res.append(LunarSixQuery(self.db, month, 13, LunarSix.SU2, 8 + 2/3)) res.append(LunarSixQuery(self.db, month, 14, LunarSix.ME, 1)) res.append(LunarSixQuery(self.db, month, 14, LunarSix.NA, 1 + 2/3)) res.append(LunarSixQuery(self.db, month, 15, LunarSix.GI6, 14.5)) res.append(LunarSixQuery(self.db, month, 27, LunarSix.KUR, 21)) if self.mode == BM33066Mode.ALL or self.mode == BM33066Mode.PLANET_ONLY: res.append(PlanetaryEventQuery(self.db, MARS, OuterPlanetPhenomena.LA, SearchRange.for_night(month, 28))) res.append(AngularSeparationQuery(self.db, MARS, GEMINI.central_star, 0, GEMINI.radius, EclipticPosition.AHEAD, SearchRange.for_night(month, 28))) return res
def year_13_month_b(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 9 [Month XII, the 1]4th. it came out eclipsed. I bēru 10° [....] return [ LunarEclipseQuery(self.db, None, ExpectedEclipseType.PARTIAL_OR_TOTAL, None, None, SearchRange.any_day(month)) ]