Dual-pol scattering power components (powers_dp) — PolSARtools 0.11 documentation

Skip to main content
`Ctrl`+`K`

# Dual-pol scattering power components (`powers_dp`)

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

  This function computes the scattering power components for dual-pol SAR C2 matrix data (decomposition/factorization based approach)

  Examples

      >>> # Basic usage with default parameters
      >>> powers_dp("/path/to/c2_data")

      >>> # Advanced usage with custom parameters
      >>> powers_dp(
      ...     in_dir="/path/to/c2_data",
      ...     method=2,
      ...     win=3,
      ...     fmt="tif",
      ...     cog=True,
      ...     block_size=(1024, 1024)
      ... )

  Parameters:

    - in_dir (str) – Path to the input folder containing C2 matrix files.

    - method (int) – 1: Decomposition based powers 2: Factorisation based powers

    - 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 the output GeoTIFF files.

    - 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.

  Return type:

    None