pyrad.util.compute_2d_hist#

pyrad.util.compute_2d_hist(field1, field2, field_name1, field_name2, step1=None, step2=None, vmin=None, vmax=None, transform=None, cap_limits=False)[source]#

computes a 2D histogram of the data

Parameters:
  • field1, field2 (ndarray 2D) – the radar fields

  • field_name1, field_name2 (str) – field names

  • step1 (float) – size of the bins along dimension 1

  • step2 (float) – size of the bins along dimension 2

  • vmin (float) – Minimum value of the 2D histogram. If vmin or vmax are not define the range limits of the field as defined in the Py-ART config file are going to be used.

  • vmax (float) – Maximum value of the 2D histogram. If vmin or vmax are not define the range limits of the field as defined in the Py-ART config file are going to be used.

  • transform (func) – A function to use to transform the histogram bins

  • cap_limits (bool) – If true, all values larger than vmax or smaller than vmin will be discarded from the scatter plot. Otherwise, they will be kept and assigned to the smallest/largest bin

Returns:

  • H (float array 2D) – The bi-dimensional histogram of samples x and y

  • xedges, yedges (float array) – the bin edges along each dimension