wradlib.dp.system_phidp_hist

wradlib.dp.system_phidp_hist#

wradlib.dp.system_phidp_hist(phidp, bins=(-180, 180, 0.1), window=11, threshold=0.5, n_lowest_rays=30)[source]#

Estimate the system differential phase (\(\Phi_{DP}^{sys}\)) offset from \(\Phi_{DP}\) histograms.

A histogram of \(\Phi_{DP}\) values is computed for each azimuth ray and smoothed along the histogram bin dimension. Two ray-wise estimates of the \(\Phi_{DP}^{sys}\) are derived:

  • sysphi_peak_ray: location of the histogram maximum.

  • sysphi_first_ray: first histogram bin exceeding a fraction of the normalized peak count.

Sweep-level estimates (sysphi_peak and sysphi_first) are obtained by aggregating the lowest n_lowest_rays ray-wise estimates.

Parameters:
  • phidp (xarray.DataArray) – Differential phase field with dimensions including range and typically azimuth.

  • bins (tuple, optional) – Histogram bin specification passed to np.arange as (start, stop, step). Default is (-180, 180, 0.1)

  • window (int, optional) – Size of the moving-average smoothing window applied to the histogram along the bin dimension. Default is 11.

  • threshold (float, optional) – Relative threshold applied to the normalized histogram. The first bin exceeding this threshold is used to derive sysphi_first_ray. Default is 0.5.

  • n_lowest_rays (int, optional) – Number of lowest ray-wise estimates used when aggregating the sweep-level \(\Phi_{DP}^{sys}\) estimate. Default is 30.

Returns:

xarray.Dataset – Dataset containing:

  • sysphi_hist: \(\Phi_{DP}\) histogram for each ray.

  • sysphi_peak_ray: ray-wise estimate from the histogram peak.

  • sysphi_first_ray: ray-wise estimate from the threshold crossing.

  • sysphi_peak: sweep-level estimate aggregated from sysphi_peak_ray.

  • sysphi_first: sweep-level estimate aggregated from sysphi_first_ray.

Examples

See Core Features - Dual-Pol - System Differential Phase.