Full-pol H-alpha clusters (cluster_h_alpha_fp)#

polsartools.cluster_h_alpha_fp(hFile, alphaFile, win=1, fmt='tif', cog=False, ovr=[2, 4, 8, 16], comp=False, max_workers=None, block_size=(512, 512), progress_callback=None)[source]

Perform H-alpha clustering on given H-alpha files for full-pol SAR data.

Examples

>>> # Basic usage with default parameters
>>> cluster_h_alpha_fp("h_fp.tif", "alpha_fp.tif")
>>> # Advanced usage with custom parameters
>>> halpha_cluster_fp(
...     hFile="h_fp.tif",
...     alphaFile="alpha_fp.tif",
...     win=5,
...     fmt="tif",
...     cog=True,
...     block_size=(1024, 1024)
... )
Parameters:
  • hFile (str) – Path to the input Entropy file, H (polarimetric entropy).

  • alphaFile (str) – Path to the input alpha file (average scattering angle).

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

  • 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 one output file to disk: - ‘ha_cluster.tif’ or ‘ha_cluster.bin’ - ‘ha_cluster.png’

Return type:

None