csep.core.regions.QuadtreeGrid2D.from_catalog

classmethod QuadtreeGrid2D.from_catalog(catalog, threshold, zoom=11, magnitudes=None, name=None)[source]

Creates instance of class from 2d numpy.array of lon/lat of Catalog. Provides multi-resolution quadtree spatial grid based on seismic density. It starts from whole globe as 4 cells (Quadkeys:’0’,’1’,’2’,’3’), then keeps on increasing the zoom-level of every Tile recursively, unless every cell meets the division criteria.

The primary criterion of dividing a parent cell into 4 child cells is a threshold on seismic density. The cells are divided unless every cell has number of earthquakes less than “threshold”. The division of a cell also stops if it reaches maximum zoom-level (zoom)

Parameters:
  • catalog (CSEPCatalog) – catalog used to create quadtree

  • threshold (int) – Max earthquakes allowed per cells

  • zoom (int) – Max zoom allowed for a cell

  • magnitudes (array-like) – left end values of magnitude discretization

Returns:

instance of QuadtreeGrid2D