Yamaguchi 4-Component decomposition (yam4cfp) — PolSARtools 0.8 documentation

Skip to main content
`Ctrl`+`K`

# Yamaguchi 4-Component decomposition (`yam4cfp`)

polsartools.yam4cfp(infolder, model='', window_size=1, outType='tif', cog_flag=False, cog_overviews=[2, 4, 8, 16], write_flag=True, max_workers=None, block_size=(512, 512), progress_callback=None)

  Perform Yamaguchi 4-Component Decomposition for full-pol SAR data.

  This function implements the Yamaguchi 4-component decomposition with three different model options: original (Y4O), rotation-corrected (Y4R), and extended volume scattering model (Y4S). The decomposition separates the total power into surface, double-bounce, volume, and helix scattering components.

  Examples

      >>> # Original Yamaguchi decomposition
      >>> yam4cfp("/path/to/fullpol_data")

      >>> # Rotation-corrected decomposition
      >>> yam4cfp(
      ...     infolder="/path/to/fullpol_data",
      ...     model="y4cr",
      ...     window_size=5,
      ...     outType="tif",
      ...     cog_flag=True
      ... )

      >>> # Extended volume model decomposition
      >>> yam4cfp(
      ...     infolder="/path/to/fullpol_data",
      ...     model="y4cs",
      ...     window_size=5
      ... )

  Parameters:

    - infolder (str) – Path to the input folder containing full-pol T3 or C3 matrix files.

    - model ({'', 'y4cr', 'y4cs'}, default='') – Decomposition model to use: - ‘’: Original Yamaguchi 4-component (Y4O) - ‘y4cr’: Rotation-corrected Yamaguchi (Y4R) - ‘y4cs’: Extended volume scattering model (Y4S)

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

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

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

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

    - write_flag (bool, default=True) – If True, writes results to disk. If False, only processes data in memory.

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

    Writes four output files to disk for the selected model: 1. {prefix}_odd: Surface scattering power 2. {prefix}_dbl: Double-bounce scattering power 3. {prefix}_vol: Volume scattering power 4. {prefix}_hlx: Helix scattering power where prefix is ‘Yam4co’, ‘Yam4cr’, or ‘Yam4csr’ based on model choice.

  Return type:

    None