pyrad.util.compute_profile_stats#

pyrad.util.compute_profile_stats(field, gate_altitude, h_vec, h_res, quantity='quantiles', quantiles=array([0.25, 0.5, 0.75]), nvalid_min=4, std_field=None, np_field=None, make_linear=False, include_nans=False)[source]#

Compute statistics of vertical profile

Parameters:
  • field (ndarray) – the radar field

  • gate_altitude (ndarray) – the altitude at each radar gate [m MSL]

  • h_vec (1D ndarray) – height vector [m MSL]

  • h_res (float) – heigh resolution [m]

  • quantity (str) – The quantity to compute. Can be [‘quantiles’, ‘mode’, ‘regression_mean’, ‘mean’]. If ‘mean’, the min, max, and average is computed.

  • quantiles (1D ndarray) – the quantiles to compute

  • nvalid_min (int) – the minimum number of points to consider the stats valid

  • std_field (ndarray) – the standard deviation of the regression at each range gate

  • np_field (ndarray) – the number of points used to compute the regression at each range gate

  • make_linear (Boolean) – If true the data is transformed into linear coordinates before taking the mean

  • include_nans (Boolean) – If true NaN will be considered as zeros

Returns:

  • vals (ndarray 2D) – The resultant statistics

  • val_valid (ndarray 1D) – The number of points to compute the stats used at each height level