pyrad.util.compute_2d_stats#
- pyrad.util.compute_2d_stats(field1, field2, field_name1, field_name2, step1=None, step2=None, vmin=None, vmax=None, transform=None, cap_limits=False)[source]#
computes a 2D histogram and statistics of the data
- Parameters:
field1, field2 (ndarray 2D) – the two fields
field_name1, field_nam2 (str) – the name of the fields
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 data prior to computing the stats
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:
hist_2d (array) – the histogram
bin_edges1, bin_edges2 (float array) – The bin edges
stats (dict) – a dictionary with statistics