pygmt.grdhisteq
- class pygmt.grdhisteq[source]
- Perform histogram equalization for a grid. - Two common use cases of - pygmt.grdhisteqare to find data values that divide a grid into patches of equal area (- pygmt.grdhisteq.compute_bins) or to write a grid with statistics based on some kind of cumulative distribution function (- pygmt.grdhisteq.equalize_grid).- Histogram equalization provides a way to highlight data that has most values clustered in a small portion of the dynamic range, such as a grid of flat topography with a mountain in the middle. Ordinary gray shading of this grid (using - pygmt.Figure.grdimageor- pygmt.Figure.grdview) with a linear mapping from topography to graytone will result in most of the image being very dark gray, with the mountain being almost white.- pygmt.grdhisteq.compute_binscan provide a list of data values that divide the data range into divisions which have an equal area in the image [Default is 16 if- divisionsis not set]. The- pandas.DataFrameor ASCII file output can be used to make a colormap with- pygmt.makecptand an image with- pygmt.Figure.grdimagethat has all levels of gray occurring equally.- pygmt.grdhisteq.equalize_gridprovides a way to write a grid with statistics based on a cumulative distribution function. In this application, the- outgridhas relative highs and lows in the same (x,y) locations as the- grid, but the values are changed to reflect their place in the cumulative distribution.
Methods Summary
| 
 | Perform histogram equalization for a grid. | 
| 
 | Perform histogram equalization for a grid. |