🔸NISAR#

RSLC (nisar_rslc)#

The nisar_rslc function extracts C2 matrix elements from the given NISAR RSLC .h5 file and saves them into a C2 directory.

polsartools.nisar_rslc(inFile, azlks=22, rglks=10)[source]

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

Example:#

>>> nisar_rslc("path_to_file.h5", azlks=30, rglks=15)
This will extract the C2 matrix elements from the specified NISAR RSLC file
and save them in the 'C2' folder.

Parameters:#

inFilestr

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

azlksint, optional (default=20)

The number of azimuth looks for multi-looking.

rglksint, optional (default=10)

The number of range looks for multi-looking.

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.

  • config.txt: A text file containing grid dimensions and polarimetric configuration.

Raises:#

Exception

If the RSLC HDF5 file is invalid or cannot be read.

GSLC (nisar_gslc)#

The nisar_gslc function extracts C2 matrix elements from the given NISAR GSLC .h5 file and saves them into a C2 directory.

polsartools.nisar_gslc(inFile, azlks=22, rglks=10)[source]

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

Example:#

>>> nisar_gslc("path_to_file.h5", azlks=30, rglks=15)
This will extract the C2 matrix elements from the specified NISAR GSLC file
and save them in the 'C2' folder.

Parameters:#

inFilestr

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

azlksint, optional (default=20)

The number of azimuth looks for multi-looking.

rglksint, optional (default=10)

The number of range looks for multi-looking.

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.

  • config.txt: A text file containing grid dimensions and polarimetric configuration.

Raises:#

Exception

If the GSLC HDF5 file is invalid or cannot be read.