csep.core.catalogs.CSEPCatalog.spatial_magnitude_counts

CSEPCatalog.spatial_magnitude_counts(mag_bins=None, tol=1e-05)

Return counts of events in space-magnitude region.

We figure out the index of the polygons and create a map that relates the spatial coordinate in the Cartesian grid with the polygon in region.

Parameters:
  • mag_bins (list, numpy.array) – magnitude bins (optional), if empty tries to use magnitude bins associated with region

  • tol (float) – tolerance for comparisons within magnitude bins

Returns:

unnormalized event count in each bin, 1d ndarray where index corresponds to midpoints

Return type:

output