segysak.SeisGeom.surface_from_points

SeisGeom.surface_from_points(points, attr, left=('cdp_x', 'cdp_y'), right=None, key=None, method='linear')

Sample a 2D point set with an attribute (like Z) to the seisnc geometry using interpolation.

Parameters
  • points (array-like) – Nx2 array-like of points with coordinates corresponding to coord1 and coord2.

  • attr (array-like, str) – If str points should be a DataFrame where attr is the column name of the attribute to be interpolated to the seisnc geometry. Else attr is a 1D array of length N.

  • left (tuple) – Length 2 tuple of coordinate dimensions to interpolate to.

  • right (tuple, optional) – If points is DataFrame right is a length 2 tuple of column keys corresponding to coordinates in argument left.

  • method (str) – The interpolation method to use for griddata from scipy. Defaults to ‘linear’

Returns

Surface with geometry specified in left.

Return type

xr.Dataset