seisflows.tools.array ===================== .. py:module:: seisflows.tools.array .. autoapi-nested-parse:: Tools useful for array manipulation in Seisflows Functions --------- .. autoapisummary:: seisflows.tools.array.sortrows seisflows.tools.array.uniquerows seisflows.tools.array.gridsmooth seisflows.tools.array.meshsmooth seisflows.tools.array.mesh2grid seisflows.tools.array.grid2mesh Module Contents --------------- .. py:function:: sortrows(a, return_index=False, return_inverse=False) Sorts the rows of a numpy array. By default returns only the sorted array :type a: np.array :param a: array to sort :type return_index: bool :param return_index: return the indices and the sorted array :type return_inverse: bool :param return_inverse: returns the inverse sorted array as well .. py:function:: uniquerows(a, sort_array=False, return_index=False) Finds unique rows of numpy array :type a: np.array :param a: array to find rows of :type sort_array: bool :param sort_array: sort the rows before findingunique rows :type return_index: bool :param return_index: return indices as well as the unique rows .. py:function:: gridsmooth(Z, span) Smooths values on 2D rectangular grid Note: 'grid': set of structured coordinates, 'mesh': set of unstructured coordinates :type Z: np.array :param Z: array to smooth :type span: float :param span: span to smooth along :rtype: np.array :return: smoothed array .. py:function:: meshsmooth(v, mesh, span) Smooths values on 2D unstructured mesh Note: 'grid': set of structured coordinates, 'mesh': set of unstructured coordinates .. py:function:: mesh2grid(v, mesh) Interpolates from an unstructured coordinates (mesh) to a structured coordinates (grid) .. py:function:: grid2mesh(V, grid, mesh) Interpolates from structured coordinates (grid) to unstructured coordinates (mesh)