csep.core.regions.CartesianGrid2D.from_origins

classmethod CartesianGrid2D.from_origins(origins, dh=None, magnitudes=None, name=None)[source]

Creates instance of class from 2d numpy.array of lon/lat origins.

Note: Grid spacing should be constant in the entire region. This condition is not explicitly checked for for performance reasons.

Parameters:
  • origins (numpy.ndarray like) – [:,0] = lons and [:,1] = lats

  • magnitudes (numpy.array like) – optional, if provided will bind magnitude information to the class.

Returns:

cls