pygmt.grdhisteq

pygmt.grdhisteq(grid, *, divisions=None, outgrid=None, region=None, gaussian=None, quadratic=None, verbose=None, interpolation=None, **kwargs)[source]

Perform histogram equalization for a grid.

Full option list at https://docs.generic-mapping-tools.org/latest/grdhisteq.html

Aliases:

  • C = divisions

  • G = outgrid

  • N = gaussian

  • Q = quadratic

  • R = region

  • V = verbose

  • n = interpolation

Parameters
  • grid (str or xarray.DataArray) – The file name of the input grid or the grid loaded as a DataArray.

  • outgrid (str or None) – The name of the output netCDF file with extension .nc to store the grid in.

  • divisions (int or str) – The number of divisions of data range to make [Default is 16].

  • region (str or list) – Required if this is the first plot command. xmin/xmax/ymin/ymax[+r][+uunit]. Specify the region of interest.

  • verbose (bool or str) –

    Select verbosity level [Default is w], which modulates the messages written to stderr. Choose among 7 levels of verbosity:

    • q - Quiet, not even fatal error messages are produced

    • e - Error messages only

    • w - Warnings [Default]

    • t - Timings (report runtimes for time-intensive algorithms);

    • i - Informational messages (same as verbose=True)

    • c - Compatibility warnings

    • d - Debugging messages

Returns

ret (xarray.DataArray or None) – Return type depends on whether the outgrid parameter is set:

  • xarray.DataArray if outgrid is not set

  • None if outgrid is set (grid output will be stored in file set by outgrid)