invert4geom.normalized_mindist#
- normalized_mindist(points, grid, low=None, high=None, mindist=None, region=None)[source]#
Find the minimum distance between each grid cell and the nearest point. If low and high are provided, normalize the min dists grid between these values. If region is provided, all grid cells outside region are set to a distance of 0.
- Parameters:
points (pandas.DataFrame) â coordinates of the points
grid (xarray.DataArray) â gridded data to find min dists for each grid cell
low (float | None, optional) â lower value for normalization, by default None
high (float | None, optional) â higher value for normalization, by default None
mindist (float | None, optional) â the minimum allowed distance, all values below are set equal to, by default None
region (list[float] | None, optional) â bounding region for which all grid cells outside will be set to low, by default None
- Returns:
grid of normalized minimum distances
- Return type: