🔸NISAR#

RSLC (import_nisar_rslc)#

The import_nisar_rslc function extracts Sxy/C2/T2 (for dual-pol), S2/C4/T4/C3/T3/C2/T2 (for full-pol) matrix elements from the given NISAR RSLC .h5 file and saves them into a C2 directory.

polsartools.import_nisar_rslc(inFile, mat='T3', azlks=22, rglks=10, fmt='tif', cog=False, ovr=[2, 4, 8, 16], comp=False, out_dir=None, recip=False, max_workers=None)[source]

Extracts the C2 (for dual-pol), S2/C3/T3 (for full-pol) matrix elements from a NISAR RSLC HDF5 file and saves them into respective binary files.

Example:#

>>> import_nisar_rslc("path_to_file.h5", azlks=30, rglks=15)
This will extract the C2 (for dual-pol), S2/C3/T3 (for full-pol) matrix elements from the specified NISAR RSLC file
and save them in the respective folders.

Parameters:#

inFilestr

The path to the NISAR RSLC HDF5 file containing the radar data.

matstr, optional (default = ‘T3’ or ‘C2)

Type of matrix to extract. Valid options for Full-pol: ‘S2’, ‘C4, ‘C3’, ‘T4’, ‘T3’, ‘C2HX’, ‘C2VX’, ‘C2HV’,’T2HV’and Dual-pol: ‘Sxy’,’C2’.

azlksint, optional (default=3)

The number of azimuth looks for multi-looking.

rglksint, optional (default=3)

The number of range looks for multi-looking.

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.

recipbool, optional (default=False)

If True, scattering matrix reciprocal symmetry is applied, i.e, S_HV = S_VH.

GSLC (import_nisar_gslc)#

The import_nisar_gslc function extracts Sxy/C2/T2 (for dual-pol), S2/C4/T4/C3/T3/C2/T2 (for full-pol) matrix elements from the given NISAR GSLC .h5 file and saves them into a C2 directory.

polsartools.import_nisar_gslc(inFile, mat='T3', azlks=2, rglks=2, fmt='tif', cog=False, ovr=[2, 4, 8, 16], comp=False, out_dir=None, recip=False, max_workers=None)[source]

Extracts the C2 matrix elements (C11, C22, and C12) from a NISAR GSLC HDF5 file and saves them into respective binary files.

Example:#

>>> import_nisar_gslc("path_to_file.h5", azlks=30, rglks=15)
This will extract the C2 matrix elements from the dual-pol NISAR GSLC file
and save them in the 'C2' folder. or for full-pol 'T3'

Parameters:#

inFilestr

The path to the NISAR GSLC HDF5 file containing the radar data.

matstr, optional (default = ‘C2’ for Dual-pol, ‘T3’ for Full-pol)

Type of matrix to extract. Valid options for Full-pol: ‘S2’, ‘C4, ‘C3’, ‘T4’, ‘T3’, ‘C2HX’, ‘C2VX’, ‘C2HV’,’T2HV’and Dual-pol: ‘Sxy’,’C2’.

azlksint, optional (default=3)

The number of azimuth looks for multi-looking.

rglksint, optional (default=3)

The number of range looks for multi-looking.

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

Output format: - ‘tif’: GeoTIFF with georeferencing - ‘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.

recipbool, optional (default=False)

If True, scattering matrix reciprocal symmetry is applied, i.e, S_HV = S_VH.