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 year_0_month_8(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 5 Month VIII, (eclipse) which was omitted. # 6 At 30° before sunset. return [ LunarEclipseQuery( self.db, FirstContactTime(30, FirstContactRelative.BEFORE_SUNSET), ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_25_month_5(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 3' Year 25. Month V, 1 ½ bēru after sunset. t = (1.5 * BERU_US) return [ LunarEclipseQuery( self.db, FirstContactTime(t, FirstContactRelative.AFTER_SUNSET), ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_24_month_a(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 1' [....] .... [....] # 2' .... beginning of night, onset [....] return [ LunarEclipseQuery( self.db, FirstContactTime(0, FirstContactRelative.AFTER_SUNSET), ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_25_month_11(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 4' Month XI, evening watch, onset. # USAN = "first part of the night" (evening watch) return [ LunarEclipseQuery( self.db, FirstContactTime(25, FirstContactRelative.AFTER_SUNSET), ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_11_month_2(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 3 Year 11. Month II, [....] 10° after sunset it began # 4 it was total, and 10? [....] return [ LunarEclipseQuery( self.db, FirstContactTime(10, FirstContactRelative.AFTER_SUNSET), ExpectedEclipseType.TOTAL, None, None, SearchRange.any_day(month)) ]
def year_16_month_b(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 14 [Month X,] the 14th. morning watch. ⅔ bēru before sunrise?. # 15 half of it was covered. [It set] eclipsed. t = (2 / 3 * BERU_US) return [ LunarEclipseQuery( self.db, FirstContactTime(t, FirstContactRelative.BEFORE_SUNRISE), ExpectedEclipseType.PARTIAL, None, None, SearchRange.for_night_and_day(month, 14)) ]
def year_17_month_10(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 17 [Month] X, the 13th, morning watch. 1 bēru 5° [before sunrise?] # 18 all of it was covered. [It set eclips]ed. t = (1 * BERU_US) + 5 return [ LunarEclipseQuery( self.db, FirstContactTime(t, FirstContactRelative.BEFORE_SUNRISE), ExpectedEclipseType.TOTAL, None, None, SearchRange.for_night_and_day(month, 13)) ]
def year_32_month_6(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 9' (Year) 32 of Nebukadnezar, # 10' month VI, (eclipse) which was omitted. # 11' At 35° before sunset. return [ LunarEclipseQuery( self.db, FirstContactTime(35, FirstContactRelative.BEFORE_SUNSET), ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_14_month_6(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 3' (Year) 14 of Nebukadnezar # 4' month VI, (eclipse) which was omitted. # 5' With sunrise. return [ LunarEclipseQuery( self.db, FirstContactTime(0, FirstContactRelative.AFTER_SUNRISE), ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_29_month_2(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 13' Year 29. [Mon]th II, the 14th, [....] # 14' 1 bēru 10° before sunrise, t = (1 * BERU_US) + 10 return [ LunarEclipseQuery( self.db, FirstContactTime(t, FirstContactRelative.BEFORE_SUNRISE), ExpectedEclipseType.PARTIAL_OR_TOTAL, None, None, SearchRange.for_night_and_day(month, 14)) ]
def year_5_month_c(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 13 [Month XI,] (after) 5 months, 3 ½ bēru after sunset, # 14 [....] two-thirds was covered. In the south it was covered. In the west? [it cleared.] # 15 [In?] its eclipse, .... [....] t = (3.5 * BERU_US) return [ LunarEclipseQuery( self.db, FirstContactTime(t, FirstContactRelative.AFTER_SUNSET), ExpectedEclipseType.PARTIAL, None, None, SearchRange.any_day(month)) ]
def year_4_month_1(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 8 [Year 4. M]onth I, the 13th, middle watch, 3 bēru 5° after sunset, # 9 it began in the west and north. Three quarters # 10 [was covered.] It cleared in the north. The north wind blew. t = (3 * BERU_US) + 5 return [ LunarEclipseQuery( self.db, FirstContactTime(t, FirstContactRelative.AFTER_SUNSET), ExpectedEclipseType.PARTIAL, None, None, SearchRange.for_night_and_day(month, 13)) ]
def year_28_month_b(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 10' [Month IX, the 1]5th? 3 ½ bēru after sunset, # 11' it began [in] the east. All of it was covered. # 12· It cleared? in the west?. [nn] bēru onset and clearing. t = 3.5 * BERU_US return [ LunarEclipseQuery( self.db, FirstContactTime(t, FirstContactRelative.AFTER_SUNSET), ExpectedEclipseType.TOTAL, None, None, SearchRange.any_day(month)) ]
def year_0_month_2(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 1 Accession year of Šamaš-šumu-ukīn. # 2 month II, (after) 5 months; # 3 (eclipse) which was omitted. # 4 At 40° after sunrise. return [ LunarEclipseQuery( self.db, FirstContactTime(40, FirstContactRelative.AFTER_SUNRISE), ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def plot_eclipse_time_of_day_score(dest: str): eclipse = { 'sunrise': 1458133.8958227257, 'partial_eclipse_begin': 1458133.9258227257 } actual = diff_time_degrees_signed(eclipse['partial_eclipse_begin'], eclipse['sunrise']) f, ax1 = plt.subplots() ax1.set_xlabel('Observed Time After Sunrise (UŠ)') ax1.set_ylabel('Score') xs = np.arange(-15, 25, 0.01) ys = list( map( lambda x: LunarEclipseQuery.eclipse_time_of_day_score( eclipse, FirstContactTime(x, FirstContactRelative.AFTER_SUNRISE ), REGULAR_TIME_TOLERANCE), xs)) ax1.plot(xs, ys, label="Regular (λ = {})".format(REGULAR_TIME_TOLERANCE), color='g') xs = np.arange(-15, 25, 0.01) ys = list( map( lambda x: LunarEclipseQuery.eclipse_time_of_day_score( eclipse, FirstContactTime(x, FirstContactRelative.AFTER_SUNRISE ), HIGH_TIME_TOLERANCE), xs)) ax1.plot(xs, ys, label="High (λ = {})".format(HIGH_TIME_TOLERANCE), color='b') ax1.axvline(x=actual, color='r', label="Correct Time") ax1.legend() plt.savefig(dest)
def year_18_month_2(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 1 (Year) 18 of Šamaš-šumu-ukīn, # 2 month II, (after) 5 months, # 3 (eclipse) which was omitted. # 4 At 1,0° before sunset. t = (1 * 60) + 0 return [ LunarEclipseQuery( self.db, FirstContactTime(t, FirstContactRelative.BEFORE_SUNSET), ExpectedEclipseType.UNKNOWN, None, None, SearchRange.any_day(month)) ]
def year_2_month_b(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 4 [Month VII, the 1]4th?, 1 ⅔ bēru 5°, variant 1 ½ bēru, after sunset, # 5 it began in the [....] north; half was covered. In the north and west it began # 6 [to cl]ear. [1] ½ bēru onset and clearing. The west wind blew. t = 1.5 * BERU_US return [ LunarEclipseQuery( self.db, FirstContactTime(t, FirstContactRelative.AFTER_SUNSET), ExpectedEclipseType.PARTIAL, CompositePhaseTiming(0.5 * BERU_US), None, SearchRange.any_day(month)) ]
def year_50_month_7(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 2' Month VII, the 13th, in 17° on the east side' # 3' all was covered; 28° maximal phase. # 4' In 20° it cleared from east to west. # 5' Its eclipse was red. # 6' Behind the rump of Aries it was eclipsed. # 7' During onset, the north wind blew, during clearing. the west wind. # 8' At 55° before sunrise. day13 = SearchRange.for_night_and_day(month, 13) eclipse_length = SeparatePhaseTimings(17, 28, 20) eclipse_time = FirstContactTime(55, FirstContactRelative.BEFORE_SUNRISE) location = EclipsePosition(ARIES.central_star, 0, ARIES.radius, EclipticPosition.BEHIND) res1 = LunarEclipseQuery(self.db, eclipse_time, ExpectedEclipseType.TOTAL, eclipse_length, location, day13) return [res1]
def year_68_month_7(self, month: List[BabylonianDay]) -> List[AbstractQuery]: # 4' Month VII, the 11+[xth, ....] # 5' ⅔ of the disk to tota[lity ....] # 6' not total, it set eclipsed. # 7' The north wind which was set to the west side # 8' blew. 5° # 9' in front of η Tauri it was eclipsed. # 10' At 14° before [sunrise]. # Comment: V' 5': the missing word at the end of the line may have meant "was missing" # Visibility description kind of unclear range = SearchRange.x_plus(month, 11) eclipse_time = FirstContactTime(14, FirstContactRelative.BEFORE_SUNRISE) location = EclipsePosition(ALCYONE, 0, 15, EclipticPosition.AHEAD) res1 = LunarEclipseQuery(self.db, eclipse_time, ExpectedEclipseType.UNKNOWN, None, location, range) return [res1]
def year_7_month_10(self, month: List[BabylonianDay]) -> List[AbstractQuery]: res = [] if self.mode == BM33066Mode.ALL or self.mode == BM33066Mode.ECLIPSE_ONLY: t = (2 + 1 / 2) * 30 res.append(LunarEclipseQuery(self.db, FirstContactTime(t, FirstContactRelative.BEFORE_SUNRISE), ExpectedEclipseType.TOTAL, None, None, SearchRange.for_night(month, 14))) if self.mode == BM33066Mode.ALL or self.mode == BM33066Mode.PLANET_ONLY: res.append(PlanetaryEventQuery(self.db, JUPITER, OuterPlanetPhenomena.ST, SearchRange.for_night(month, 27))) res.append(AngularSeparationQuery(self.db, JUPITER, LIBRA.central_star, 0, LIBRA.radius, EclipticPosition.AHEAD, SearchRange.for_night(month, 27))) # Month X, the 5th, Mercury was ½ cubit behind Venus. res.append(AngularSeparationQuery(self.db, MERCURY, VENUS, 0.5 * CUBIT, 0.5 * CUBIT, EclipticPosition.BEHIND, SearchRange.for_night(month, 5))) return res
def year_7_month_4(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, 27)) res.append(LunarSixQuery(self.db, month, 13, LunarSix.SU2, 11)) res.append(LunarSixQuery(self.db, month, 14, LunarSix.ME, 4)) res.append(LunarSixQuery(self.db, month, 14, LunarSix.NA, 4)) res.append(LunarSixQuery(self.db, month, 15, LunarSix.GI6, 8.5)) res.append(LunarSixQuery(self.db, month, 27, LunarSix.KUR, 15)) if self.mode == BM33066Mode.ALL or self.mode == BM33066Mode.ECLIPSE_ONLY: t = (1 + 2/3) * 30 res.append(LunarEclipseQuery(self.db, FirstContactTime(t, FirstContactRelative.AFTER_SUNSET), ExpectedEclipseType.TOTAL, None, None, SearchRange.for_night(month, 14))) if self.mode == BM33066Mode.ALL or self.mode == BM33066Mode.PLANET_ONLY: # Year 7, month IV, the 1st, the moon became visible 3 cubits behind Mercury. res.append(AngularSeparationQuery(self.db, MOON, MERCURY, 3 * CUBIT, 1 * CUBIT, EclipticPosition.BEHIND, SearchRange.for_night(month, 1))) return res