Non-negative Eigen Value decomposition (nned_fp)#
- polsartools.nned_fp(in_dir, 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 Non-Negative Eigenvalue Decomposition (NNED) for full-pol SAR data.
This function implements the Non-Negative Eigenvalue Decomposition for full-polarimetric SAR data, ensuring physically meaningful decomposition results by constraining eigenvalues to be non-negative. The method decomposes the total power into odd-bounce (surface), double-bounce, and volume scattering components.
Examples
>>> # Basic usage with default parameters >>> nned_fp("/path/to/fullpol_data")
>>> # Advanced usage with custom parameters >>> nned_fp( ... in_dir="/path/to/fullpol_data", ... win=5, ... fmt="tif", ... cog=True, ... block_size=(1024, 1024) ... )
- Parameters:
in_dir (str) – Path to the input folder containing full-pol T3 or C3 matrix files.
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 Cloud Optimized GeoTIFF (COG) outputs 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, uses LZW compression for GeoTIFF outputs.
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 three output files to disk:
NNED_odd: Odd-bounce (surface) scattering component
NNED_dbl: Double-bounce scattering component
NNED_vol: Volume scattering component
- Return type:
None
Notes
The NNED method ensures physical realizability by: 1. Maintaining non-negative eigenvalues 2. Preserving total power conservation 3. Ensuring positive semi-definite coherency matrices