From d1c4d7f93fe3f9ec11bf11e32259ea02b21a0dcd Mon Sep 17 00:00:00 2001 From: "Gustavo H. X. Shiroma" Date: Thu, 3 Jul 2025 11:30:42 -0700 Subject: [PATCH 1/9] disable polarimetric symmetrization by default --- share/nisar/defaults/gcov.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/nisar/defaults/gcov.yaml b/share/nisar/defaults/gcov.yaml index db0c71352..3b9da8a89 100644 --- a/share/nisar/defaults/gcov.yaml +++ b/share/nisar/defaults/gcov.yaml @@ -177,7 +177,7 @@ runconfig: # HV and VH), otherwise, the flag is ignored. # If enabled, the output product's "HV" dataset will contain symmetrized # HV/VH data and the "VH" dataset will be omitted from the output. - symmetrize_cross_pol_channels: True + symmetrize_cross_pol_channels: False # TODO OPTIONAL - Only checked when internet access is available dem_download: From 2ac26942f19a6ff2e3145a96ca52044d09f867ea Mon Sep 17 00:00:00 2001 From: "Gustavo H. X. Shiroma" Date: Tue, 22 Jul 2025 13:58:03 -0700 Subject: [PATCH 2/9] revert changes to `symmetrize_cross_pol_channels` --- share/nisar/defaults/gcov.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/nisar/defaults/gcov.yaml b/share/nisar/defaults/gcov.yaml index 3b9da8a89..db0c71352 100644 --- a/share/nisar/defaults/gcov.yaml +++ b/share/nisar/defaults/gcov.yaml @@ -177,7 +177,7 @@ runconfig: # HV and VH), otherwise, the flag is ignored. # If enabled, the output product's "HV" dataset will contain symmetrized # HV/VH data and the "VH" dataset will be omitted from the output. - symmetrize_cross_pol_channels: False + symmetrize_cross_pol_channels: True # TODO OPTIONAL - Only checked when internet access is available dem_download: From 05d7fda0ff21704541179bfc5b0fb5415ebae1b6 Mon Sep 17 00:00:00 2001 From: "Gustavo H. X. Shiroma" Date: Tue, 22 Jul 2025 16:01:58 -0700 Subject: [PATCH 3/9] Update GCOV and GSLC specification XMLs --- .../nisar/products/XML/L2/nisar_L2_GCOV.xml | 291 ++++++++++------ .../nisar/products/XML/L2/nisar_L2_GSLC.xml | 321 +++++++++++------- 2 files changed, 371 insertions(+), 241 deletions(-) diff --git a/python/packages/nisar/products/XML/L2/nisar_L2_GCOV.xml b/python/packages/nisar/products/XML/L2/nisar_L2_GCOV.xml index 021b48b6a..a9e931bdb 100644 --- a/python/packages/nisar/products/XML/L2/nisar_L2_GCOV.xml +++ b/python/packages/nisar/products/XML/L2/nisar_L2_GCOV.xml @@ -105,7 +105,7 @@ + shape="numberOfObservations"> List of planned datatakes included in the product @@ -127,13 +127,19 @@ List of frequency layers available in the product - + List of each input raw dataset's observation mode + + - Indicates if the radar operation mode is a diagnostic mode (1-2) or DBFed science (0): 0, 1, or 2 - + Indicates if the radar operation mode is a diagnostic mode (1-2) or DBFed science (0): 0, 1, or 2 + @@ -182,7 +188,7 @@ name="/science/LSAR/identification/processingType" shape="scalar"> Nominal (or) Urgent (or) Custom (or) Undefined + lang="en">Processing pipeline used to generate this granule. "Nominal": standard production system; "Urgent": time-sensitive processing in response to urgent response events; "Custom": user-initiated processing outside the nominal production system X coordinates in specified projection Y coordinates in specified projection @@ -329,7 +337,7 @@ valid_min="0" _FillValue="nan" grid_mapping="projection" - units="1">Radiometric terrain correction factor to normalize GCOV terms from gamma0 to sigma0 + units="1">Radiometric terrain correction (RTC) scaling factor to normalize backscatter coefficients from gamma0 to sigma0, accounting for local terrain Mask indicating the subswath number associated with valid GCOV samples. A GCOV sample is only considered valid if it is generated from fully-focused radar samples. If at least one radar sample in the averaging set is partially focused or invalid, the corresponding mask pixel will contain the value `0`. GCOV pixels outside of the radar acquisition extent are filled with the value `255` + grid_mapping="projection">Mask indicating the subswath number associated with valid GCOV samples. A GCOV sample is only considered valid if it is generated from fully-focused radar samples. If at least one radar sample in the averaging set is partially focused or invalid, the corresponding mask pixel will contain the value 0. GCOV pixels outside of the radar acquisition extent are filled with the value 255 X coordinates in specified projection Y coordinates in specified projection @@ -706,7 +716,7 @@ valid_min="0" _FillValue="nan" grid_mapping="projection" - units="1">Radiometric terrain correction factor to normalize GCOV terms from gamma0 to sigma0 + units="1">Radiometric terrain correction (RTC) scaling factor to normalize backscatter coefficients from gamma0 to sigma0, accounting for local terrain Mask indicating the subswath number associated with valid GCOV samples. A GCOV sample is only considered valid if it is generated from fully-focused radar samples. If at least one radar sample in the averaging set is partially focused or invalid, the corresponding mask pixel will contain the value `0`. GCOV pixels outside of the radar acquisition extent are filled with the value `255` + grid_mapping="projection">Mask indicating the subswath number associated with valid GCOV samples. A GCOV sample is only considered valid if it is generated from fully-focused radar samples. If at least one radar sample in the averaging set is partially focused or invalid, the corresponding mask pixel will contain the value 0. GCOV pixels outside of the radar acquisition extent are filled with the value 255 East component of unit vector of LOS from target to sensor + units="1">East component of the line-of-sight (LOS) unit vector, defined from the target to the sensor, expressed in the east-north-up (ENU) coordinate system with its origin at the target location North component of unit vector of LOS from target to sensor + units="1">North component of the line-of-sight (LOS) unit vector, defined from the target to the sensor, expressed in the east-north-up (ENU) coordinate system with its origin at the target location East component of unit vector along ground track + units="1">East component of the along-track unit vector at the target location, expressed in the east-north-up (ENU) coordinate system and projected onto the horizontal plane (i.e., excluding the up component) North component of unit vector along ground track + units="1">North component of the along-track unit vector at the target location, expressed in the east-north-up (ENU) coordinate system and projected onto the horizontal plane (i.e., excluding the up component) X coordinates in specified projection X coordinates in specified projection - - + + Product map grid projection: EPSG code, with additional projection information as HDF5 Attributes + + + Y coordinates in specified projection + + + X coordinates in specified projection + Crosstalk in H-transmit channel expressed as ratio txV / txH Crosstalk in V-transmit channel expressed as ratio txH / txV Crosstalk in H-receive channel expressed as ratio rxV / rxH Crosstalk in V-receive channel expressed as ratio rxH / rxV + + @@ -2437,14 +2519,14 @@ Reference Terrain Height as a function of map coordinates + units="meters">Reference terrain height as a function of map coordinates scalar values - - - number of datatakes in product - - - number of observations in product + lang="en">Number of observations in product @@ -3372,28 +3445,22 @@ Shape of calibration LUTs + lang="en">Shape of real-valued calibration LUTs - Shape of antenna pattern datasets + lang="en">Shape of complex-valued calibration LUTs - - Shape of crosstalk datasets - - + shape="numberOfObservations"> List of planned datatakes included in the product @@ -127,13 +127,19 @@ List of frequency layers available in the product - + List of each input raw dataset's observation mode + + - Indicates if the radar operation mode is a diagnostic mode (1-2) or DBFed science (0): 0, 1, or 2 - + Indicates if the radar operation mode is a diagnostic mode (1-2) or DBFed science (0): 0, 1, or 2 + @@ -182,7 +188,7 @@ name="/science/LSAR/identification/processingType" shape="scalar"> Nominal (or) Urgent (or) Custom (or) Undefined + lang="en">Processing pipeline used to generate this granule. "Nominal": standard production system; "Urgent": time-sensitive processing in response to urgent response events; "Custom": user-initiated processing outside the nominal production system Mask indicating the subswath number representing valid GSLC samples. Each GSLC pixel is assumed valid if all the pixels in the interpolation window are fully focused in the input RSLC. A value of `0` indicates that at least one RSLC pixel in the interpolation window is partially focused or invalid. Pixels outside of the radar acquisition extent are filled with the value `255`. + _FillValue="255">Mask indicating the subswath number representing valid GSLC samples. Each GSLC pixel is assumed valid if all the pixels in the interpolation window are fully focused in the input RSLC. A value of 0 indicates that at least one RSLC pixel in the interpolation window is partially focused or invalid. Pixels outside of the radar acquisition extent are filled with the value 255. Focused SLC image (HH) @@ -373,7 +379,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image HV" - grid_mapping='projection' + grid_mapping="projection" DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (HV) @@ -393,7 +399,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image VH" - grid_mapping='projection' + grid_mapping="projection" DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (VH) @@ -413,7 +419,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image VV" - grid_mapping='projection' + grid_mapping="projection" DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (VV) @@ -433,7 +439,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image RH" - grid_mapping='projection' + grid_mapping="projection" DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (RH) @@ -453,7 +459,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image RV" - grid_mapping='projection' + grid_mapping="projection" DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (RV) @@ -538,14 +544,14 @@ Mask indicating the subswath number representing valid GSLC samples. Each GSLC pixel is assumed valid if all the pixels in the interpolation window are fully focused in the input RSLC. A value of `0` indicates that at least one RSLC pixel in the interpolation window is partially focused or invalid. Pixels outside of the radar acquisition extent are filled with the value `255`. + _FillValue="255">Mask indicating the subswath number representing valid GSLC samples. Each GSLC pixel is assumed valid if all the pixels in the interpolation window are fully focused in the input RSLC. A value of 0 indicates that at least one RSLC pixel in the interpolation window is partially focused or invalid. Pixels outside of the radar acquisition extent are filled with the value 255. Focused SLC image (HH) @@ -626,7 +632,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image HV" - grid_mapping='projection' + grid_mapping="projection" DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (HV) @@ -646,7 +652,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image VH" - grid_mapping='projection' + grid_mapping="projection" DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (VH) @@ -666,7 +672,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image VV" - grid_mapping='projection' + grid_mapping="projection" DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (VV) @@ -686,7 +692,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image RH" - grid_mapping='projection' + grid_mapping="projection" DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (RH) @@ -706,7 +712,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image RVH" - grid_mapping='projection' + grid_mapping="projection" DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (RV) @@ -832,7 +838,7 @@ _FillValue="nan" grid_mapping="projection" long_name="LOS unit vector X" - units="1">East component of unit vector of LOS from target to sensor + units="1">East component of the line-of-sight (LOS) unit vector, defined from the target to the sensor, expressed in the east-north-up (ENU) coordinate system with its origin at the target location North component of unit vector of LOS from target to sensor + units="1">North component of the line-of-sight (LOS) unit vector, defined from the target to the sensor, expressed in the east-north-up (ENU) coordinate system with its origin at the target location East component of unit vector along ground track + units="1">East component of the along-track unit vector at the target location, expressed in the east-north-up (ENU) coordinate system and projected onto the horizontal plane (i.e., excluding the up component) North component of unit vector along ground track + units="1">North component of the along-track unit vector at the target location, expressed in the east-north-up (ENU) coordinate system and projected onto the horizontal plane (i.e., excluding the up component) X coordinates in specified projection X coordinates in specified projection - - + + Product map grid projection: EPSG code, with additional projection information as HDF5 Attributes + + + Y coordinates in specified projection + + + X coordinates in specified projection + Crosstalk in H-transmit channel expressed as ratio txV / txH Crosstalk in V-transmit channel expressed as ratio txH / txV Crosstalk in H-receive channel expressed as ratio rxV / rxH Crosstalk in V-receive channel expressed as ratio rxH / rxV + + @@ -2096,7 +2174,7 @@ lang="en" _FillValue="nan" grid_mapping="projection" - units="meters">Reference Terrain Height as a function of geographical location + units="meters">Reference terrain height as a function of map coordinates scalar values - - - number of datatakes in product - - - number of observations in product + lang="en">Number of observations in product @@ -3116,28 +3185,22 @@ Shape of calibration LUTs + lang="en">Shape of real-valued calibration LUTs - Shape of antenna pattern datasets + lang="en">Shape of complex-valued calibration LUTs - - Shape of crosstalk datasets - - Number of input L1 SLC granules + name="numberOfInputL1Files"/> From 749058db5115479f727ca055d828370ecd1ec07e Mon Sep 17 00:00:00 2001 From: "Gustavo H. X. Shiroma" Date: Wed, 23 Jul 2025 11:45:11 -0700 Subject: [PATCH 4/9] Revert changes to the GCOV and GSLC specification XMLs --- .../nisar/products/XML/L2/nisar_L2_GCOV.xml | 291 ++++++---------- .../nisar/products/XML/L2/nisar_L2_GSLC.xml | 321 +++++++----------- 2 files changed, 241 insertions(+), 371 deletions(-) diff --git a/python/packages/nisar/products/XML/L2/nisar_L2_GCOV.xml b/python/packages/nisar/products/XML/L2/nisar_L2_GCOV.xml index a9e931bdb..021b48b6a 100644 --- a/python/packages/nisar/products/XML/L2/nisar_L2_GCOV.xml +++ b/python/packages/nisar/products/XML/L2/nisar_L2_GCOV.xml @@ -105,7 +105,7 @@ + shape="numberOfDatatakes"> List of planned datatakes included in the product @@ -127,19 +127,13 @@ List of frequency layers available in the product - - List of each input raw dataset's observation mode - - - Indicates if the radar operation mode is a diagnostic mode (1-2) or DBFed science (0): 0, 1, or 2 - + Indicates if the radar operation mode is a diagnostic mode (1-2) or DBFed science (0): 0, 1, or 2 + @@ -188,7 +182,7 @@ name="/science/LSAR/identification/processingType" shape="scalar"> Processing pipeline used to generate this granule. "Nominal": standard production system; "Urgent": time-sensitive processing in response to urgent response events; "Custom": user-initiated processing outside the nominal production system + lang="en">Nominal (or) Urgent (or) Custom (or) Undefined X coordinates in specified projection Y coordinates in specified projection @@ -337,7 +329,7 @@ valid_min="0" _FillValue="nan" grid_mapping="projection" - units="1">Radiometric terrain correction (RTC) scaling factor to normalize backscatter coefficients from gamma0 to sigma0, accounting for local terrain + units="1">Radiometric terrain correction factor to normalize GCOV terms from gamma0 to sigma0 Mask indicating the subswath number associated with valid GCOV samples. A GCOV sample is only considered valid if it is generated from fully-focused radar samples. If at least one radar sample in the averaging set is partially focused or invalid, the corresponding mask pixel will contain the value 0. GCOV pixels outside of the radar acquisition extent are filled with the value 255 + grid_mapping="projection">Mask indicating the subswath number associated with valid GCOV samples. A GCOV sample is only considered valid if it is generated from fully-focused radar samples. If at least one radar sample in the averaging set is partially focused or invalid, the corresponding mask pixel will contain the value `0`. GCOV pixels outside of the radar acquisition extent are filled with the value `255` X coordinates in specified projection Y coordinates in specified projection @@ -716,7 +706,7 @@ valid_min="0" _FillValue="nan" grid_mapping="projection" - units="1">Radiometric terrain correction (RTC) scaling factor to normalize backscatter coefficients from gamma0 to sigma0, accounting for local terrain + units="1">Radiometric terrain correction factor to normalize GCOV terms from gamma0 to sigma0 Mask indicating the subswath number associated with valid GCOV samples. A GCOV sample is only considered valid if it is generated from fully-focused radar samples. If at least one radar sample in the averaging set is partially focused or invalid, the corresponding mask pixel will contain the value 0. GCOV pixels outside of the radar acquisition extent are filled with the value 255 + grid_mapping="projection">Mask indicating the subswath number associated with valid GCOV samples. A GCOV sample is only considered valid if it is generated from fully-focused radar samples. If at least one radar sample in the averaging set is partially focused or invalid, the corresponding mask pixel will contain the value `0`. GCOV pixels outside of the radar acquisition extent are filled with the value `255` East component of the line-of-sight (LOS) unit vector, defined from the target to the sensor, expressed in the east-north-up (ENU) coordinate system with its origin at the target location + units="1">East component of unit vector of LOS from target to sensor North component of the line-of-sight (LOS) unit vector, defined from the target to the sensor, expressed in the east-north-up (ENU) coordinate system with its origin at the target location + units="1">North component of unit vector of LOS from target to sensor East component of the along-track unit vector at the target location, expressed in the east-north-up (ENU) coordinate system and projected onto the horizontal plane (i.e., excluding the up component) + units="1">East component of unit vector along ground track North component of the along-track unit vector at the target location, expressed in the east-north-up (ENU) coordinate system and projected onto the horizontal plane (i.e., excluding the up component) + units="1">North component of unit vector along ground track X coordinates in specified projection X coordinates in specified projection + + - - Product map grid projection: EPSG code, with additional projection information as HDF5 Attributes - - - Y coordinates in specified projection - - - X coordinates in specified projection - Crosstalk in H-transmit channel expressed as ratio txV / txH Crosstalk in V-transmit channel expressed as ratio txH / txV Crosstalk in H-receive channel expressed as ratio rxV / rxH Crosstalk in V-receive channel expressed as ratio rxH / rxV - - @@ -2519,14 +2437,14 @@ Reference terrain height as a function of map coordinates + units="meters">Reference Terrain Height as a function of map coordinates scalar values + + + number of datatakes in product + + + Number of observations in product + lang="en">number of observations in product @@ -3445,22 +3372,28 @@ Shape of real-valued calibration LUTs + lang="en">Shape of calibration LUTs - Shape of complex-valued calibration LUTs + lang="en">Shape of antenna pattern datasets + + Shape of crosstalk datasets + + + shape="numberOfDatatakes"> List of planned datatakes included in the product @@ -127,19 +127,13 @@ List of frequency layers available in the product - - List of each input raw dataset's observation mode - - - Indicates if the radar operation mode is a diagnostic mode (1-2) or DBFed science (0): 0, 1, or 2 - + Indicates if the radar operation mode is a diagnostic mode (1-2) or DBFed science (0): 0, 1, or 2 + @@ -188,7 +182,7 @@ name="/science/LSAR/identification/processingType" shape="scalar"> Processing pipeline used to generate this granule. "Nominal": standard production system; "Urgent": time-sensitive processing in response to urgent response events; "Custom": user-initiated processing outside the nominal production system + lang="en">Nominal (or) Urgent (or) Custom (or) Undefined Mask indicating the subswath number representing valid GSLC samples. Each GSLC pixel is assumed valid if all the pixels in the interpolation window are fully focused in the input RSLC. A value of 0 indicates that at least one RSLC pixel in the interpolation window is partially focused or invalid. Pixels outside of the radar acquisition extent are filled with the value 255. + _FillValue="255">Mask indicating the subswath number representing valid GSLC samples. Each GSLC pixel is assumed valid if all the pixels in the interpolation window are fully focused in the input RSLC. A value of `0` indicates that at least one RSLC pixel in the interpolation window is partially focused or invalid. Pixels outside of the radar acquisition extent are filled with the value `255`. Focused SLC image (HH) @@ -379,7 +373,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image HV" - grid_mapping="projection" + grid_mapping='projection' DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (HV) @@ -399,7 +393,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image VH" - grid_mapping="projection" + grid_mapping='projection' DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (VH) @@ -419,7 +413,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image VV" - grid_mapping="projection" + grid_mapping='projection' DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (VV) @@ -439,7 +433,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image RH" - grid_mapping="projection" + grid_mapping='projection' DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (RH) @@ -459,7 +453,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image RV" - grid_mapping="projection" + grid_mapping='projection' DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (RV) @@ -544,14 +538,14 @@ Mask indicating the subswath number representing valid GSLC samples. Each GSLC pixel is assumed valid if all the pixels in the interpolation window are fully focused in the input RSLC. A value of 0 indicates that at least one RSLC pixel in the interpolation window is partially focused or invalid. Pixels outside of the radar acquisition extent are filled with the value 255. + _FillValue="255">Mask indicating the subswath number representing valid GSLC samples. Each GSLC pixel is assumed valid if all the pixels in the interpolation window are fully focused in the input RSLC. A value of `0` indicates that at least one RSLC pixel in the interpolation window is partially focused or invalid. Pixels outside of the radar acquisition extent are filled with the value `255`. Focused SLC image (HH) @@ -632,7 +626,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image HV" - grid_mapping="projection" + grid_mapping='projection' DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (HV) @@ -652,7 +646,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image VH" - grid_mapping="projection" + grid_mapping='projection' DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (VH) @@ -672,7 +666,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image VV" - grid_mapping="projection" + grid_mapping='projection' DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (VV) @@ -692,7 +686,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image RH" - grid_mapping="projection" + grid_mapping='projection' DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (RH) @@ -712,7 +706,7 @@ mean_real_value="Arithmetic average of the real part of the numeric data points" sample_stddev_real="Standard deviation of the real part of the numeric data points" long_name="Geocoded single-look complex image RVH" - grid_mapping="projection" + grid_mapping='projection' DIMENSION_LIST="HDF5 internal attribute" _FillValue="(nan+nan*j)" units="1">Focused SLC image (RV) @@ -838,7 +832,7 @@ _FillValue="nan" grid_mapping="projection" long_name="LOS unit vector X" - units="1">East component of the line-of-sight (LOS) unit vector, defined from the target to the sensor, expressed in the east-north-up (ENU) coordinate system with its origin at the target location + units="1">East component of unit vector of LOS from target to sensor North component of the line-of-sight (LOS) unit vector, defined from the target to the sensor, expressed in the east-north-up (ENU) coordinate system with its origin at the target location + units="1">North component of unit vector of LOS from target to sensor East component of the along-track unit vector at the target location, expressed in the east-north-up (ENU) coordinate system and projected onto the horizontal plane (i.e., excluding the up component) + units="1">East component of unit vector along ground track North component of the along-track unit vector at the target location, expressed in the east-north-up (ENU) coordinate system and projected onto the horizontal plane (i.e., excluding the up component) + units="1">North component of unit vector along ground track X coordinates in specified projection X coordinates in specified projection + + - - Product map grid projection: EPSG code, with additional projection information as HDF5 Attributes - - - Y coordinates in specified projection - - - X coordinates in specified projection - Crosstalk in H-transmit channel expressed as ratio txV / txH Crosstalk in V-transmit channel expressed as ratio txH / txV Crosstalk in H-receive channel expressed as ratio rxV / rxH Crosstalk in V-receive channel expressed as ratio rxH / rxV - - @@ -2174,7 +2096,7 @@ lang="en" _FillValue="nan" grid_mapping="projection" - units="meters">Reference terrain height as a function of map coordinates + units="meters">Reference Terrain Height as a function of geographical location scalar values + + + number of datatakes in product + + + Number of observations in product + lang="en">number of observations in product @@ -3185,22 +3116,28 @@ Shape of real-valued calibration LUTs + lang="en">Shape of calibration LUTs - Shape of complex-valued calibration LUTs + lang="en">Shape of antenna pattern datasets + + Shape of crosstalk datasets + + Number of input L1 SLC granules + name="numberOfInputL0BFiles"/> From 1dd075f3883050e4e647386e99069beae19ba677 Mon Sep 17 00:00:00 2001 From: "Gustavo H. X. Shiroma" Date: Wed, 12 Nov 2025 11:40:19 -0800 Subject: [PATCH 5/9] ensure that LUT horizontal extents completely cover RSLC images --- python/packages/nisar/products/writers/SLC.py | 9 +++----- python/packages/nisar/workflows/focus.py | 22 +++++++++++++++---- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/python/packages/nisar/products/writers/SLC.py b/python/packages/nisar/products/writers/SLC.py index 15c704099..cf39726df 100644 --- a/python/packages/nisar/products/writers/SLC.py +++ b/python/packages/nisar/products/writers/SLC.py @@ -956,11 +956,6 @@ def add_calibration_section(self, frequency, pol, gamma0_lut: LUT2d): assert len(pol) == 2 and pol[0] in "HVLR" and pol[1] in "HV" - # TODO agree on LUT postings. - calibration_section_sampling = 50 - t = az_time_orig_vect[::calibration_section_sampling] - r = slant_range_orig_vect[::calibration_section_sampling] - cal_group = self.root.require_group("metadata/calibrationInformation") # TODO Populate backscatter conversion layers. Plan is for beta0=1, @@ -997,7 +992,9 @@ def add_calibration_section(self, frequency, pol, eap_group = cal_group.require_group( f"frequency{frequency}/elevationAntennaPattern") - t, r = require_lut_axes(eap_group, epoch, t, r, + t, r = require_lut_axes( + eap_group, epoch, az_time_orig_vect, + slant_range_orig_vect, "calibration elevationAntennaPattern records") dummy_array = np.ones((t.size, r.size), dtype=np.complex64) diff --git a/python/packages/nisar/workflows/focus.py b/python/packages/nisar/workflows/focus.py index e5d39337e..1bbe42df4 100644 --- a/python/packages/nisar/workflows/focus.py +++ b/python/packages/nisar/workflows/focus.py @@ -1764,13 +1764,27 @@ def focus(runconfig, runconfig_path=""): cal = get_calibration(cfg, band.width) slc.set_calibration(cal, frequency) - # add calibration section for each polarization + # add calibration section using as reference a radar grid + # downsampled with a factor of `50`` and with `11`` extra + # points on each direction + + # TODO agree on LUT postings. + calibration_section_sampling = 50 + extra_points = 11 + + multilooked_radar_grid = og.multilook(calibration_section_sampling, + calibration_section_sampling) + + extended_radar_grid = multilooked_radar_grid.add_margin(extra_points, + extra_points) + for pol in pols: - slc.add_calibration_section(frequency, pol, og.sensing_times, - orbit.reference_epoch, og.slant_ranges, + slc.add_calibration_section(frequency, pol, + extended_radar_grid.sensing_times, + orbit.reference_epoch, + extended_radar_grid.slant_ranges, beta0_lut, sigma0_lut, gamma0_lut) - freq = next(iter(get_bands(common_mode))) slc.set_geolocation_grid(orbit, ogrid[freq], dop[freq], epsg=cfg.processing.metadata_cube_epsg, dem=dem, From acd93f96c2ea08f535199b0bdca8561d042d9a9f Mon Sep 17 00:00:00 2001 From: "Gustavo H. X. Shiroma" Date: Wed, 12 Nov 2025 11:40:19 -0800 Subject: [PATCH 6/9] add an extra margin to the horizontal extents of RSLC LUTs --- python/packages/nisar/products/writers/SLC.py | 9 +++----- python/packages/nisar/workflows/focus.py | 22 +++++++++++++++---- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/python/packages/nisar/products/writers/SLC.py b/python/packages/nisar/products/writers/SLC.py index 15c704099..cf39726df 100644 --- a/python/packages/nisar/products/writers/SLC.py +++ b/python/packages/nisar/products/writers/SLC.py @@ -956,11 +956,6 @@ def add_calibration_section(self, frequency, pol, gamma0_lut: LUT2d): assert len(pol) == 2 and pol[0] in "HVLR" and pol[1] in "HV" - # TODO agree on LUT postings. - calibration_section_sampling = 50 - t = az_time_orig_vect[::calibration_section_sampling] - r = slant_range_orig_vect[::calibration_section_sampling] - cal_group = self.root.require_group("metadata/calibrationInformation") # TODO Populate backscatter conversion layers. Plan is for beta0=1, @@ -997,7 +992,9 @@ def add_calibration_section(self, frequency, pol, eap_group = cal_group.require_group( f"frequency{frequency}/elevationAntennaPattern") - t, r = require_lut_axes(eap_group, epoch, t, r, + t, r = require_lut_axes( + eap_group, epoch, az_time_orig_vect, + slant_range_orig_vect, "calibration elevationAntennaPattern records") dummy_array = np.ones((t.size, r.size), dtype=np.complex64) diff --git a/python/packages/nisar/workflows/focus.py b/python/packages/nisar/workflows/focus.py index e5d39337e..1bbe42df4 100644 --- a/python/packages/nisar/workflows/focus.py +++ b/python/packages/nisar/workflows/focus.py @@ -1764,13 +1764,27 @@ def focus(runconfig, runconfig_path=""): cal = get_calibration(cfg, band.width) slc.set_calibration(cal, frequency) - # add calibration section for each polarization + # add calibration section using as reference a radar grid + # downsampled with a factor of `50`` and with `11`` extra + # points on each direction + + # TODO agree on LUT postings. + calibration_section_sampling = 50 + extra_points = 11 + + multilooked_radar_grid = og.multilook(calibration_section_sampling, + calibration_section_sampling) + + extended_radar_grid = multilooked_radar_grid.add_margin(extra_points, + extra_points) + for pol in pols: - slc.add_calibration_section(frequency, pol, og.sensing_times, - orbit.reference_epoch, og.slant_ranges, + slc.add_calibration_section(frequency, pol, + extended_radar_grid.sensing_times, + orbit.reference_epoch, + extended_radar_grid.slant_ranges, beta0_lut, sigma0_lut, gamma0_lut) - freq = next(iter(get_bands(common_mode))) slc.set_geolocation_grid(orbit, ogrid[freq], dop[freq], epsg=cfg.processing.metadata_cube_epsg, dem=dem, From cec7f934ce00a1c9c0569e028969acc1f8950da9 Mon Sep 17 00:00:00 2001 From: "Gustavo H. X. Shiroma" Date: Thu, 13 Nov 2025 15:29:28 -0800 Subject: [PATCH 7/9] add an extra margin to the horizontal extents of RSLC LUTs --- .../pybind_isce3/core/Constants.cpp | 8 ++++ python/packages/isce3/geometry/doppler.py | 8 +++- python/packages/nisar/workflows/focus.py | 44 +++++++++++-------- 3 files changed, 40 insertions(+), 20 deletions(-) diff --git a/python/extensions/pybind_isce3/core/Constants.cpp b/python/extensions/pybind_isce3/core/Constants.cpp index 35ebd21b8..058c9eb71 100644 --- a/python/extensions/pybind_isce3/core/Constants.cpp +++ b/python/extensions/pybind_isce3/core/Constants.cpp @@ -20,4 +20,12 @@ void add_constants(py::module & core) core.attr("GLOBAL_MAX_HEIGHT") = py::float_(isce3::core::GLOBAL_MAX_HEIGHT); core.attr("WGS84_ELLIPSOID") = isce3::core::Ellipsoid(); core.attr("SINC_HALF") = isce3::core::SINC_HALF; + + // TODO agree on LUT postings. + core.attr("RSLC_CALIBRATION_SECTION_SAMPLING") = 50; + + // Extra margin added to RSLC LUTs to ensure that, after + // geocoding with an interpolation algoritm (e.g., bicubic spline), + // the LUTs fully cover the geocoded imagery extents. + core.attr("RSLC_LUTS_EXTRA_MARGIN_IN_PIXELS") = 11; } diff --git a/python/packages/isce3/geometry/doppler.py b/python/packages/isce3/geometry/doppler.py index 03af78f63..3407f9018 100644 --- a/python/packages/isce3/geometry/doppler.py +++ b/python/packages/isce3/geometry/doppler.py @@ -131,7 +131,13 @@ def make_doppler_lut_from_attitude( # computed. dem.compute_min_max_mean_height() - dop = np.zeros((len(az_time), len(slant_range))) + min_time = max([orbit.start_time, attitude.start_time]) + max_time = min([orbit.end_time, attitude.end_time]) + + # crop az_time using orbit and attitude extents + az_time = az_time[(az_time > min_time) & (az_time < max_time)] + + dop = np.full((len(az_time), len(slant_range)), np.nan) # Using the default EL bounds [-45, 45] deg can cause trouble when looking # near nadir, as this large interval can span both sides of the left-right diff --git a/python/packages/nisar/workflows/focus.py b/python/packages/nisar/workflows/focus.py index 1bbe42df4..d630a453f 100644 --- a/python/packages/nisar/workflows/focus.py +++ b/python/packages/nisar/workflows/focus.py @@ -291,12 +291,12 @@ def get_total_grid_bounds(rawfiles: list[str]): return epoch, tmin, tmax, rmin, rmax -def get_total_grid(rawfiles: list[str], dt, dr): +def get_total_grid(rawfiles: list[str], dt, dr, extra_margin_in_pixels=0): epoch, tmin, tmax, rmin, rmax = get_total_grid_bounds(rawfiles) - nt = int(np.ceil((tmax - tmin) / dt)) + 1 - nr = int(np.ceil((rmax - rmin) / dr)) + 1 - t = isce3.core.Linspace(tmin, dt, nt) - r = isce3.core.Linspace(rmin, dr, nr) + nt = int(np.ceil((tmax - tmin) / dt)) + 1 + 2 * extra_margin_in_pixels + nr = int(np.ceil((rmax - rmin) / dr)) + 1 + 2 * extra_margin_in_pixels + t = isce3.core.Linspace(tmin - extra_margin_in_pixels * dt, dt, nt) + r = isce3.core.Linspace(rmin - extra_margin_in_pixels * dr, dr, nr) return epoch, t, r @@ -397,7 +397,13 @@ def make_doppler_lut(rawfiles: list[str], # Now do the actual calculations. wvl = isce3.core.speed_of_light / fc - epoch_in, t, r = get_total_grid(rawfiles, azimuth_spacing, range_spacing) + + # Get grid for Doppler LUT with an extra margin to ensure that, after + # geocoding with an interpolation algoritm (e.g., bicubic spline), + # the LUT fully covers the geocoded imagery extents. + epoch_in, t, r = get_total_grid( + rawfiles, azimuth_spacing, range_spacing, + extra_margin_in_pixels=isce3.core.RSLC_LUTS_EXTRA_MARGIN_IN_PIXELS) # If timespan is too small, only one time may be provided, causing the LUT # construction to fail. Fall back to t ± Δt/2 to preserve az spacing. @@ -1764,19 +1770,19 @@ def focus(runconfig, runconfig_path=""): cal = get_calibration(cfg, band.width) slc.set_calibration(cal, frequency) - # add calibration section using as reference a radar grid - # downsampled with a factor of `50`` and with `11`` extra - # points on each direction - - # TODO agree on LUT postings. - calibration_section_sampling = 50 - extra_points = 11 - - multilooked_radar_grid = og.multilook(calibration_section_sampling, - calibration_section_sampling) - - extended_radar_grid = multilooked_radar_grid.add_margin(extra_points, - extra_points) + # add calibration section based on a downsampled radar grid, + # including an extra margin to ensure that, after geocoding + # with an interpolation algoritm (e.g., bicubic spline), + # the LUTs fully cover the geocoded imagery extents. + calibration_section_sampling = \ + isce3.core.RSLC_LUTS_EXTRA_MARGIN_IN_PIXELS + multilooked_radar_grid = og.multilook( + calibration_section_sampling, calibration_section_sampling) + + luts_extra_margin_in_pixels = \ + isce3.core.RSLC_LUTS_EXTRA_MARGIN_IN_PIXELS + extended_radar_grid = multilooked_radar_grid.add_margin( + luts_extra_margin_in_pixels, luts_extra_margin_in_pixels) for pol in pols: slc.add_calibration_section(frequency, pol, From 648c2e2ee46613ddfc8c88b56c5ddaa348c6b39b Mon Sep 17 00:00:00 2001 From: "Gustavo H. X. Shiroma" Date: Thu, 13 Nov 2025 15:33:47 -0800 Subject: [PATCH 8/9] add an extra margin to the horizontal extents of RSLC LUTs --- python/packages/isce3/geometry/doppler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/packages/isce3/geometry/doppler.py b/python/packages/isce3/geometry/doppler.py index 3407f9018..d4c9ab68a 100644 --- a/python/packages/isce3/geometry/doppler.py +++ b/python/packages/isce3/geometry/doppler.py @@ -131,12 +131,12 @@ def make_doppler_lut_from_attitude( # computed. dem.compute_min_max_mean_height() + # crop az_time using orbit and attitude extents min_time = max([orbit.start_time, attitude.start_time]) max_time = min([orbit.end_time, attitude.end_time]) - - # crop az_time using orbit and attitude extents az_time = az_time[(az_time > min_time) & (az_time < max_time)] + # create Doppler Centroid array filled with NaNs dop = np.full((len(az_time), len(slant_range)), np.nan) # Using the default EL bounds [-45, 45] deg can cause trouble when looking From c3302ae8445437932fcd3e6a6da06d22a83af481 Mon Sep 17 00:00:00 2001 From: "Gustavo H. X. Shiroma" Date: Thu, 13 Nov 2025 16:17:43 -0800 Subject: [PATCH 9/9] add an extra margin to the horizontal extents of RSLC LUTs --- python/packages/isce3/geometry/doppler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/packages/isce3/geometry/doppler.py b/python/packages/isce3/geometry/doppler.py index d4c9ab68a..a5ee669fa 100644 --- a/python/packages/isce3/geometry/doppler.py +++ b/python/packages/isce3/geometry/doppler.py @@ -136,8 +136,8 @@ def make_doppler_lut_from_attitude( max_time = min([orbit.end_time, attitude.end_time]) az_time = az_time[(az_time > min_time) & (az_time < max_time)] - # create Doppler Centroid array filled with NaNs - dop = np.full((len(az_time), len(slant_range)), np.nan) + # create Doppler Centroid array filled with zeros + dop = np.zeros((len(az_time), len(slant_range))) # Using the default EL bounds [-45, 45] deg can cause trouble when looking # near nadir, as this large interval can span both sides of the left-right