# Dual-Pol and Differential Phase¶

## Overview¶

This module provides algorithms to process polarimetric radar moments, namely the differential phase, $$Phi_{DP}$$, and, based on successful $$Phi_{DP}$$ retrieval, also the specific differential phase, $$K_{DP}$$. Please note that the actual application of polarimetric moments is implemented in the corresponding wradlib modules, e.g.:

Establishing a valid $$Phi_{DP}$$ profile for $$K_{DP}$$ retrieval involves despeckling (linear_despeckle), phase unfolding, and iterative retrieval of $$Phi_{DP}$$ form $$K_{DP}$$. The main workflow and its single steps is based on a publication by [Vulpiani et al., 2012]. For convenience, the entire workflow has been put together in the function wradlib.dp.process_raw_phidp_vulpiani.

Once a valid $$Phi_{DP}$$ profile has been established, the kdp_from_phidp functions can be used to retrieve $$K_{DP}$$.

Please note that so far, the functions in this module were designed to increase performance. This was mainly achieved by allowing the simultaneous application of functions over multiple array dimensions. The only requirement to apply these function is that the range dimension must be the last dimension of all input arrays.

 process_raw_phidp_vulpiani Establish consistent $$Phi_{DP}$$ profiles from raw data. kdp_from_phidp_finitediff Retrieves $$K_{DP}$$ from $$Phi_{DP}$$ by applying a moving window range finite difference derivative. kdp_from_phidp_linregress Alternative $$K_{DP}$$ from $$Phi_{DP}$$ by applying a moving window linear regression. kdp_from_phidp_convolution Alternative $$K_{DP}$$ from $$Phi_{DP}$$ by applying a convolution filter where possible and linear regression otherwise. kdp_from_phidp_sobel Alternative $$K_{DP}$$ from $$Phi_{DP}$$ by applying a sobel filter where possible and linear regression otherwise. unfold_phi_vulpiani Alternative phase unfolding which completely relies on Kdp. unfold_phi Unfolds differential phase by adjusting values that exceeded maximum ambiguous range. linear_despeckle Remove floating pixels in between NaNs in a multi-dimensional array. texture Compute the texture of the data by comparing values with a 3x3 neighborhood (based on [Gourley et al., 2007]).