wradlib.dp.DpMethods.delta_phidp#
- DpMethods.delta_phidp(rng, **kwargs)[source]#
Estimate \(\Phi_{DP}\) statistics from the first and last densest range windows.
This function analyzes an xarray DataArray phidp defined along a coordinate named
rangeand identifies:the first range window spanning at least
rngthat contains the maximum number of valid (non-NaN) observations, andthe last such window when scanning from the far end of the ray.
For each window, the median phase value is computed. The phase difference between the last and first window is returned together with diagnostic information.
- Parameters:
phidp (
xarray.DataArray) – Input phase-like data indexed by a coordinate namedrange. NaN values are treated as missing data.rng (
float) – Desired window width in the same units asphidp.range. The actual width used is the smallest whole-gate window that spans at leastrng.
- Keyword Arguments:
min_periods (
int) – Minimum number of valid samples required within a rolling window. Defaults to the full window size.- Returns:
xarray.Dataset– Dataset containing:- phibxarray.DataArray
Rolling count of valid observations.
- start_rangexarray.DataArray
Left edge of the first densest window.
- stop_rangexarray.DataArray
Right edge of the last densest window.
- firstxarray.DataArray
Median phase within the first densest window.
- first_idxxarray.DataArray
Index of the left edge of the first densest window.
- lastxarray.DataArray
Median phase within the last densest window.
- last_idxxarray.DataArray
Index of the right edge of the last densest window.
- dphixarray.DataArray
Difference between
lastandfirst. Total \(\Delta \Phi_{DP}\).- center_spanfloat
center-to-center span of selected bins
Notes
Assumes uniform spacing along
phi.range.The rolling count is computed using
center=False.If multiple windows contain the same maximum number of valid observations, the first occurrence is selected.
start_rangerefers to the left edge of the first densest window.stop_rangerefers to the right edge of the last densest window.The actual window width may be slightly larger than
rngbecause whole range bins are used.
Examples
See Core Features - Dual-Pol - Total Differential Phase Shift.