🔸ALOS-4 PALSAR-3#

UWD L1.1 (import_alos4_uwd_l11)#

The import_alos4_uwd_l11 function extracts C2 matrix elements from the given ALOS-4 UWD mode folder and saves them into a C2 directory.

polsartools.import_alos4_uwd_l11(in_dir, mat='C2', azlks=25, rglks=5, fmt='tif', cog=False, ovr=[2, 4, 8, 16], comp=False, out_dir=None, cf_dB=-83)[source]

Extracts the C2 matrix elements (C11, C22, and C12) from ALOS-4 Ultra Wide Beam Dual-Pol (UWD) CEOS data and saves them into respective binary files.

Example:#

>>> import_alos4_uwd_l11("path_to_folder", azlks=25, rglks=5)
This will extract the C2 matrix elements from the ALOS-2 Wide Beam Dual-Pol data
in the specified folder and save them in the 'C2' directory.

Parameters:#

in_dirstr

The path to the folder containing the ALOS-2 Wide Beam Dual-Pol CEOS data files.

matstr, optional (default = ‘S2’ or ‘Sxy)

Type of matrix to extract. Valid options: ‘Sxy’,’C2’, ‘T2’.

azlksint, optional (default=25)

The number of azimuth looks for multi-looking.

rglksint, optional (default=5)

The number of range looks for multi-looking.

swathint, optional (default=1)

The swath number [1,2,3,4,5].

fmt{‘tif’, ‘bin’}, optional (default=’tif’)

Output format: - ‘tif’: GeoTIFF - ‘bin’: Raw binary format

cogbool, optional (default=False)

If True, outputs will be saved as Cloud Optimized GeoTIFFs with internal tiling and overviews.

ovrlist of int, optional (default=[2, 4, 8, 16])

Overview levels for COG generation. Ignored if cog=False.

compbool, optional (default=False)

If True, applies LZW compression to GeoTIFF outputs.

out_dirstr or None, optional (default=None)

Directory to save output files. If None, a folder named after the matrix type will be created in the same location as the input file.

cf_dBfloat, optional (default=-83)

The calibration factor in dB used to scale the raw radar data. It is applied to the HH and HV polarization data before matrix computation.

Returns:#

None

The function does not return any value. Instead, it creates a folder named C2 (if not already present) and saves the following binary files:

  • C11.bin: Contains the C11 matrix elements.

  • C22.bin: Contains the C22 matrix elements.

  • C12_real.bin: Contains the real part of the C12 matrix.

  • C12_imag.bin: Contains the imaginary part of the C12 matrix.

Raises:#

FileNotFoundError

If the required ALOS-4 data files (e.g., IMG-HH and IMG-HV) cannot be found in the specified folder.