Example #1
0
 def test_cross_idl(self):
     lons = [-179.2, 178.0]
     lats = [3.0, 4.0]
     maximum_distance = {"Subduction IntraSlab": 200}
     sitecol = SiteCollection.from_points(lons, lats, SiteModelParam())
     tile = Tile(sitecol, maximum_distance)
     self.assertEqual(repr(tile), "<Tile 178 <= lon <= 180, 3 <= lat <= 4>")
     src = make_point_source(-179.3, 3.5)
     self.assertTrue(src in tile)
     src = make_point_source(178.2, 3.5)
     self.assertTrue(src in tile)
Example #2
0
 def test_cross_idl(self):
     lons = [-179.2, 178.0]
     lats = [3.0, 4.0]
     maximum_distance = {'Subduction IntraSlab': 200}
     sitecol = SiteCollection.from_points(lons, lats, SiteModelParam())
     tile = Tile(sitecol, maximum_distance)
     self.assertEqual(repr(tile), '<Tile 178 <= lon <= 180, 3 <= lat <= 4>')
     src = make_point_source(-179.3, 3.5)
     self.assertTrue(src in tile)
     src = make_point_source(178.2, 3.5)
     self.assertTrue(src in tile)
Example #3
0
 def test_normal(self):
     lons = [10, -1.2]
     lats = [20, -3.4]
     maximum_distance = {"Subduction IntraSlab": 200}
     sitecol = SiteCollection.from_points(lons, lats, SiteModelParam())
     tile = Tile(sitecol, maximum_distance)
     self.assertEqual(repr(tile), "<Tile -1 <= lon <= 10, -3 <= lat <= 20>")
     src = make_point_source(1, 10)
     self.assertTrue(src in tile)
Example #4
0
 def test_normal(self):
     lons = [10, -1.2]
     lats = [20, -3.4]
     maximum_distance = {'Subduction IntraSlab': 200}
     sitecol = SiteCollection.from_points(lons, lats, SiteModelParam())
     tile = Tile(sitecol, maximum_distance)
     self.assertEqual(repr(tile), '<Tile -1 <= lon <= 10, -3 <= lat <= 20>')
     src = make_point_source(1, 10)
     self.assertTrue(src in tile)