Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
da95af1
sm r3.4
Sep 19, 2023
3a8e2ec
merge R4.0.2beta-1
Mar 11, 2024
b6cfbbb
change the SM commit id for R4.0.2
May 23, 2024
f764f2f
merge upstream develop branch
Jun 4, 2024
a920ae6
Merge remote-tracking branch 'upstream/develop' into develop
Jun 5, 2024
1d28fae
Merge remote-tracking branch 'upstream/develop' into develop
Jun 13, 2024
84f3874
Merge remote-tracking branch 'upstream/develop' into develop
Aug 12, 2024
2bb897a
Merge remote-tracking branch 'upstream/develop' into develop
Sep 14, 2024
da76f88
Merge branch 'develop' of https://github-fn.jpl.nasa.gov/isce-3/isce …
Oct 2, 2024
6313217
Merge branch 'develop' of https://github-fn.jpl.nasa.gov/isce-3/isce …
Oct 9, 2024
ce2b301
Merge branch 'develop' of https://github-fn.jpl.nasa.gov/isce-3/isce …
Oct 15, 2024
8394511
Merge branch 'develop' of https://github-fn.jpl.nasa.gov/isce-3/isce …
Oct 24, 2024
72645bd
Merge branch 'develop' of https://github-fn.jpl.nasa.gov/isce-3/isce …
Oct 29, 2024
6f93fd3
Merge branch 'develop' of https://github-fn.jpl.nasa.gov/isce-3/isce …
Dec 9, 2024
eebd988
Merge branch 'develop' of https://github-fn.jpl.nasa.gov/isce-3/isce …
Jan 21, 2025
9b108ce
Merge branch 'develop' of https://github-fn.jpl.nasa.gov/isce-3/isce …
Jan 29, 2025
b1c78f7
Merge branch 'develop' of https://github-fn.jpl.nasa.gov/isce-3/isce …
Mar 18, 2025
e46f53f
Merge branch 'develop' of https://github-fn.jpl.nasa.gov/isce-3/isce …
Apr 10, 2025
54d6ab4
Merge branch 'develop' of https://github-fn.jpl.nasa.gov/isce-3/isce …
May 12, 2025
73b6b9b
Merge branch 'develop' of https://github-fn.jpl.nasa.gov/isce-3/isce …
Jun 10, 2025
2eb1387
Merge branch 'develop' of https://github.com/isce-framework/isce3 int…
Sep 30, 2025
42f2514
Merge branch 'develop' of https://github.com/isce-framework/isce3 int…
Nov 14, 2025
39c9883
Merge branch 'develop' of https://github.com/isce-framework/isce3 int…
Dec 1, 2025
f6cfd55
Merge branch 'develop' of https://github.com/isce-framework/isce3 int…
Jan 14, 2026
6176caa
Merge branch 'develop' of https://github.com/isce-framework/isce3 int…
Jan 16, 2026
1f111b3
Merge branch 'develop' of https://github.com/isce-framework/isce3 int…
Mar 23, 2026
0cf5e3b
Merge branch 'develop' of https://github.com/isce-framework/isce3 int…
Apr 2, 2026
41199fb
Merge branch 'develop' of https://github.com/isce-framework/isce3 int…
Apr 27, 2026
a0bbee4
Merge branch 'develop' of https://github.com/isce-framework/isce3 int…
May 27, 2026
f459daf
Merge branch 'develop' of https://github.com/isce-framework/isce3 int…
Jul 31, 2026
d59acbe
Merge branch 'develop' of https://github.com/isce-framework/isce3 int…
Aug 19, 2026
d0b4e94
update the insar mask
Sep 10, 2026
12dc20b
update the subswath mask
Sep 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions python/packages/nisar/products/insar/GOFF_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,35 @@ def add_grids_to_hdf5(self):
self.add_list_of_layers(grids_freq_group)

for pol in pol_list:

# Create the valid mask for each polarization
pixeloffsets_pol_name = \
f"{pixeloffsets_group_name}/{pol}"
pixeloffsets_pol_group = \
self.require_group(pixeloffsets_pol_name)

yds, xds = set_get_geo_info(
self,
pixeloffsets_pol_name,
goff_geogrids,
)
self._create_2d_dataset(
pixeloffsets_pol_group,
"validMask",
goff_shape,
np.uint8,
(f"Valid mask for the {pol} layers: "
"bit 1 = reference (1=valid, 0=invalid), bit 0 = secondary (1=valid, 0=invalid)"),
Units.unitless,
grids_val,
long_name="Valid data mask",
xds=xds,
yds=yds,
fill_value=np.uint8(255),
)
pixeloffsets_pol_group['validMask'].attrs['valid_min'] = np.uint8(0)

# Create the offsets layers
for layer in layers:
pixeloffsets_pol_layer_name = \
f"{pixeloffsets_group_name}/{pol}/{layer}"
Expand Down
49 changes: 35 additions & 14 deletions python/packages/nisar/products/insar/GUNW_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,23 +349,27 @@ def add_grids_to_hdf5(self):
unwrapped_ds_params = [
("coherenceMagnitude", np.float32,
f"Coherence magnitude between {pol} layers",
Units.unitless),
Units.unitless, None, None),
("connectedComponents", np.uint16,
f"Connected components for {pol} layer",
Units.unitless),
Units.unitless,None, None),
("ionospherePhaseScreen", np.float32,
"Ionosphere phase screen",
Units.radian),
Units.radian,None, None),
("ionospherePhaseScreenUncertainty", np.float32,
"Uncertainty of the ionosphere phase screen",
"radians"),
"radians",None, None),
("unwrappedPhase", np.float32,
f"Unwrapped interferogram between {pol} layers",
Units.radian),
Units.radian,None, None),
("validMask", np.uint8,
(f"Valid mask for the {pol} layers: "
"bit 1 = reference (1=valid, 0=invalid), bit 0 = secondary (1=valid, 0=invalid)"),
Units.unitless,np.uint8(255), "Valid data mask"),
]

for ds_param in unwrapped_ds_params:
ds_name, ds_datatype, ds_description, ds_unit\
ds_name, ds_datatype, ds_description, ds_unit, fill_value, long_name\
= ds_param
self._create_2d_dataset(
unwrapped_pol_group,
Expand All @@ -377,7 +381,10 @@ def add_grids_to_hdf5(self):
grids_val,
xds=xds,
yds=yds,
long_name=long_name,
fill_value=fill_value
)
unwrapped_pol_group['validMask'].attrs['valid_min'] = np.uint8(0)

wrapped_pol_name = f"{wrapped_group_name}/{pol}"
wrapped_pol_group = self.require_group(wrapped_pol_name)
Expand All @@ -393,14 +400,18 @@ def add_grids_to_hdf5(self):
wrapped_ds_params = [
("coherenceMagnitude", np.float32,
f"Coherence magnitude between {pol} layers",
Units.unitless),
Units.unitless, None, None),
("wrappedInterferogram", np.complex64,
f"Complex wrapped interferogram between {pol} layers",
Units.unitless),
Units.unitless, None, None),
("validMask", np.uint8,
(f"Valid mask for the {pol} layers: "
"bit 1 = reference (1=valid, 0=invalid), bit 0 = secondary (1=valid, 0=invalid)"),
Units.unitless,np.uint8(255), "Valid data mask"),
]

for ds_param in wrapped_ds_params:
ds_name, ds_datatype, ds_description, ds_unit\
ds_name, ds_datatype, ds_description, ds_unit, fill_value, long_name\
= ds_param
self._create_2d_dataset(
wrapped_pol_group,
Expand All @@ -412,7 +423,10 @@ def add_grids_to_hdf5(self):
grids_val,
xds=xds,
yds=yds,
long_name=long_name,
fill_value=fill_value
)
wrapped_pol_group['validMask'].attrs['valid_min'] = np.uint8(0)

pixeloffsets_pol_name = f"{pixeloffsets_group_name}/{pol}"
pixeloffsets_pol_group = self.require_group(
Expand All @@ -430,17 +444,21 @@ def add_grids_to_hdf5(self):
pixel_offsets_ds_params = [
("alongTrackOffset", np.float32,
"Along-track offset",
Units.meter),
Units.meter, None, None),
("correlationSurfacePeak", np.float32,
"Normalized cross-correlation surface peak",
Units.unitless),
Units.unitless, None, None),
("slantRangeOffset", np.float32,
"Slant range offset",
Units.meter),
Units.meter, None, None),
("validMask", np.uint8,
(f"Valid mask for the {pol} layers: "
"bit 1 = reference (1=valid, 0=invalid), bit 0 = secondary (1=valid, 0=invalid)"),
Units.unitless,np.uint8(255), "Valid data mask"),
]

for ds_param in pixel_offsets_ds_params:
ds_name, ds_datatype, ds_description, ds_unit\
ds_name, ds_datatype, ds_description, ds_unit, fill_value, long_name\
= ds_param
self._create_2d_dataset(
pixeloffsets_pol_group,
Expand All @@ -452,4 +470,7 @@ def add_grids_to_hdf5(self):
grids_val,
xds=xds,
yds=yds,
)
long_name=long_name,
fill_value=fill_value
)
pixeloffsets_pol_group['validMask'].attrs['valid_min'] = np.uint8(0)
68 changes: 61 additions & 7 deletions python/packages/nisar/products/insar/InSAR_L1_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from .InSAR_base_writer import InSARBaseWriter
from .product_paths import L1GroupsPaths
from .units import Units
from .utils import (extract_datetime_from_string, generate_dem_rdr,
generate_insar_mask,
from .utils import (extract_datetime_from_string, extract_pol_valid_mask,
generate_dem_rdr, generate_insar_mask,
get_geolocation_grid_cube_obj, save_to_hdf5_ds)


Expand Down Expand Up @@ -312,30 +312,52 @@ def _add_datasets_to_pixel_offset_group(self):
pixel_offsets_ds_params = [
(
"alongTrackOffset",
np.float32,
"Along-track offset",
Units.meter,
None,
),
(
"correlationSurfacePeak",
np.float32,
"Normalized correlation surface peak",
Units.unitless,
None,
),
(
"slantRangeOffset",
np.float32,
"Slant range offset",
Units.meter,
None,
),
(
"slantRangeOffset",
np.float32,
"Slant range offset",
Units.meter,
None,
),
(
"validMask",
np.uint8,
f"Valid mask for the {pol} layers: bit 1 = reference (1=valid, 0=invalid), bit 0 = secondary (1=valid, 0=invalid)",
Units.unitless,
np.uint8(255),
),
]

for pixel_offsets_ds_param in pixel_offsets_ds_params:
ds_name, ds_description, ds_unit = pixel_offsets_ds_param
ds_name, ds_type, ds_description, ds_unit, fill_value\
= pixel_offsets_ds_param
self._create_2d_dataset(
offset_pol_group,
ds_name,
off_shape,
np.float32,
ds_type,
ds_description,
units=ds_unit,
fill_value=fill_value,
)

def add_pixel_offsets_to_swaths_group(self):
Expand Down Expand Up @@ -531,7 +553,7 @@ def add_pixel_offsets_to_swaths_group(self):
az_idx = np.round([rslc_radar_grid.azimuth_index(az)
for az in offset_zero_doppler_time])

offset_group['mask'][...] = \
offset_group['mask'][...], pol_valid_mask = \
generate_insar_mask(self.ref_rslc,
self.sec_rslc,
self.ref_h5py_file_obj,
Expand All @@ -545,6 +567,21 @@ def add_pixel_offsets_to_swaths_group(self):
# add the datasets to pixel offsets group
self._add_datasets_to_pixel_offset_group()

# Update the validMask in the pixelOffsets groups for each polarization
for pol in pol_list:

offset_pol_group_name = (
f"{offset_group_name}/{pol}"
)
offset_pol_group = self.require_group(offset_pol_group_name)

# Extract polarization-dependent valid mask
valid_mask = extract_pol_valid_mask(pol_valid_mask, pol)

offset_pol_group['validMask'][...] = valid_mask
offset_pol_group['validMask'].attrs['valid_min'] = np.uint8(0)
offset_pol_group['validMask'].attrs['long_name'] = to_bytes("Valid data mask")

def add_interferogram_to_swaths_group(self, is_unwrapped=False):
"""
Add the interferogram group to the swaths group
Expand Down Expand Up @@ -762,7 +799,7 @@ def add_interferogram_to_swaths_group(self, is_unwrapped=False):
az_idx = np.round([rslc_radar_grid.azimuth_index(az)
for az in igram_zero_doppler_time])

igram_group['mask'][...] = \
igram_group['mask'][...], pol_valid_mask = \
generate_insar_mask(self.ref_rslc,
self.sec_rslc,
self.ref_h5py_file_obj,
Expand All @@ -787,19 +824,36 @@ def add_interferogram_to_swaths_group(self, is_unwrapped=False):
np.float32,
f"Coherence magnitude between {pol} layers",
Units.unitless,
None,
),
(
"validMask",
np.uint8,
f"Valid mask for the {pol} layers: bit 1 = reference (1=valid, 0=invalid), bit 0 = secondary (1=valid, 0=invalid)",
Units.unitless,
np.uint8(255),
),
]

for igram_ds_param in igram_ds_params:
ds_name, ds_dtype, ds_description, ds_unit = igram_ds_param
ds_name, ds_dtype, ds_description, ds_unit, fill_value\
= igram_ds_param
self._create_2d_dataset(
igram_pol_group,
ds_name,
igram_shape,
ds_dtype,
ds_description,
units=ds_unit,
fill_value=fill_value
)
if ds_name == 'validMask':
# Extract polarization-dependent valid mask
valid_mask = extract_pol_valid_mask(pol_valid_mask, pol)

igram_pol_group['validMask'][...] = valid_mask
igram_pol_group['validMask'].attrs['valid_min'] = np.uint8(0)
igram_pol_group['validMask'].attrs['long_name'] = to_bytes("Valid data mask")

def add_swaths_to_hdf5(self):
"""
Expand Down
13 changes: 13 additions & 0 deletions python/packages/nisar/products/insar/ROFF_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,19 @@ def _add_datasets_to_pixel_offset_group(self):
f"{swaths_freq_group_name}/pixelOffsets/{pol}"
pixeloffsets_pol_group = \
self.require_group(offset_pol_group_name)

self._create_2d_dataset(
pixeloffsets_pol_group,
"validMask",
off_shape,
np.uint8,
(f"Valid mask for the {pol} layers: "
"bit 1 = reference (1=valid, 0=invalid), bit 0 = secondary (1=valid, 0=invalid)"),
units=Units.unitless,
long_name="Valid data mask",
fill_value=np.uint8(255),
)

for layer in proc_cfg["offsets_product"]:
if layer.startswith("layer"):
layer_group_name = f"{offset_pol_group_name}/{layer}"
Expand Down
Loading
Loading