src / pysoilmap / features.py

diff_gauss

diff_gauss(dem, cellsize, dx, dy, sigma=1)[source]

Applies a Gaussian derivative filter to the given DEM.

This is the same as smoothing the DEM with the given lengthscale sigma and then calculating the nth-order derivatives in the given directions.

Parameters:
  • dem (ndarray) – DEM (z coordinates of each pixel of a regular rectangular grid)

  • cellsize (tuple) – pixel (width, height)

  • dx (int) – order of derivative in x direction

  • dy (int) – order of derivative in y direction

  • sigma (float) – lengthscale in unit of pixels

Return type:

ndarray