Dual polarimetric descriptors (dp_desc) — PolSARtools 0.11 documentation

Skip to main content
`Ctrl`+`K`

# Dual polarimetric descriptors (`dp_desc`)

polsartools.dp_desc(cpFile, xpFile, win=1, fmt='tif', cog=False, ovr=[2, 4, 8, 16], comp=False, max_workers=None, block_size=(512, 512), progress_callback=None)

  Compute dual polarimetric descriptors (mc, Hc, and Thetac) from Dual-pol GRD data.

  This function calculates the mc, Degree of Purity), Hc, Pseudo-Entropy, and Thetac, Pseudo-Scattering Type Parameter using co-polarized (cpFile) and cross-polarized (xpFile) SAR raster files.

  Examples

      >>> # Basic usage with default parameters
      >>> dp_desc("/path/to/copol_file.tif", "/path/to/crosspol_file.tif")

      >>> # Advanced usage with custom parameters
      >>> dp_desc(
      ...     cpFile="/path/to/copol_file.tif",
      ...     xpFile="/path/to/crosspol_file.tif",
      ...     win=3,
      ...     fmt="tif",
      ...     cog=True,
      ...     block_size=(1024, 1024)
      ... )

  Parameters:

    - cpFile (str) – Path to the co-polarized backscatter (linear) SAR raster file.

    - xpFile (str) – Path to the cross-polarized backscatter (linear) SAR raster file.

    - win (int, default=1) – Size of the spatial averaging window. Larger windows reduce speckle noise but decrease spatial resolution.

    - fmt ({'tif', 'bin'}, default='tif') – Output file format: - ‘tif’: GeoTIFF format with georeferencing information - ‘bin’: Raw binary format

    - cog (bool, default=False) – If True, creates a Cloud Optimized GeoTIFF (COG) with internal tiling and overviews for efficient web access.

    - ovr (list[int], default=[2, 4, 8, 16]) – Overview levels for COG creation. Each number represents the decimation factor for that overview level.

    - comp (bool, default=False) – If True, applies LZW compression to reduce file size (default is False).

    - max_workers (int | None, default=None) – Maximum number of parallel processing workers. If None, uses CPU count - 1 workers.

    - block_size (tuple[int, int], default=(512, 512)) – Size of processing blocks (rows, cols) for parallel computation. Larger blocks use more memory but may be more efficient.

  Returns:

    Results are saved as ‘mc.tif’, ‘Hc.tif’, and ‘Thetac.tif’ (or ‘.bin’ if fmt=’bin’).

  Return type:

    None