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
d1c4d7f
disable polarimetric symmetrization by default
gshiroma Jul 3, 2025
0ef09a8
Merge branch 'isce-framework:develop' into develop
gshiroma Jul 9, 2025
2ac2694
revert changes to `symmetrize_cross_pol_channels`
gshiroma Jul 22, 2025
05d7fda
Update GCOV and GSLC specification XMLs
gshiroma Jul 22, 2025
749058d
Revert changes to the GCOV and GSLC specification XMLs
gshiroma Jul 23, 2025
fc8ac53
Merge branch 'isce-framework:develop' into develop
gshiroma Jul 24, 2025
064d073
Merge branch 'isce-framework:develop' into develop
gshiroma Aug 7, 2025
22464ef
Merge branch 'isce-framework:develop' into develop
gshiroma Aug 7, 2025
a75e7f1
Merge branch 'isce-framework:develop' into develop
gshiroma Aug 11, 2025
ab21d36
Merge branch 'isce-framework:develop' into develop
gshiroma Aug 12, 2025
d61d489
Merge branch 'isce-framework:develop' into develop
gshiroma Aug 18, 2025
0af53dd
Merge branch 'isce-framework:develop' into develop
gshiroma Aug 20, 2025
d454e6a
Merge branch 'isce-framework:develop' into develop
gshiroma Aug 21, 2025
6e7e9d1
Merge branch 'isce-framework:develop' into develop
gshiroma Aug 28, 2025
dd80c38
Merge branch 'isce-framework:develop' into develop
gshiroma Aug 29, 2025
63853b2
Merge branch 'isce-framework:develop' into develop
gshiroma Aug 29, 2025
7c7272f
Merge branch 'isce-framework:develop' into develop
gshiroma Sep 2, 2025
dd18a84
Merge branch 'isce-framework:develop' into develop
gshiroma Sep 17, 2025
d43ca22
Merge branch 'isce-framework:develop' into develop
gshiroma Oct 6, 2025
c62d750
Merge branch 'isce-framework:develop' into develop
gshiroma Oct 29, 2025
5922bbf
Merge branch 'isce-framework:develop' into develop
gshiroma Nov 6, 2025
9cc7088
Merge branch 'isce-framework:develop' into develop
gshiroma Dec 15, 2025
c207327
Merge branch 'isce-framework:develop' into develop
gshiroma Jan 10, 2026
b37c144
Merge branch 'isce-framework:develop' into develop
gshiroma Mar 11, 2026
046a9ce
Merge branch 'isce-framework:develop' into develop
gshiroma Mar 30, 2026
23e6e7f
Merge branch 'isce-framework:develop' into develop
gshiroma Apr 27, 2026
82bc63a
Merge branch 'isce-framework:develop' into develop
gshiroma May 20, 2026
c3be272
Merge branch 'isce-framework:develop' into develop
gshiroma May 28, 2026
c924bec
Merge branch 'isce-framework:develop' into develop
gshiroma Jun 2, 2026
f6256a2
Merge branch 'isce-framework:develop' into develop
gshiroma Jun 8, 2026
ab7a78c
save the grid_mapping attribute only when generating L2 products
gshiroma Jun 18, 2026
1dda8dc
Add comments and docstrings
gshiroma Aug 20, 2026
2d51dc3
improve docstrings
gshiroma Aug 21, 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
3 changes: 3 additions & 0 deletions python/packages/nisar/products/insar/InSAR_L2_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ def add_secondary_radar_grid_cube(self, sec_cube_group_path,
az_coord_units = f'seconds since {ref_epoch_str[:19]}'

create_dataset_kwargs = {}
# L2 geocoded products require `grid_mapping` to reference the
# `projection` dataset
create_dataset_kwargs['grid_mapping'] = "projection"
Comment thread
gshiroma marked this conversation as resolved.
create_dataset_kwargs['chunk_size'] = chunk_size
create_dataset_kwargs['compression_enabled'] = compression_enabled
create_dataset_kwargs['compression_type'] = compression_type
Expand Down
66 changes: 65 additions & 1 deletion python/packages/nisar/workflows/h5_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,9 @@ def add_radar_grid_cubes_to_hdf5(hdf5_obj, cube_group_name, geogrid,
z_vect=heights, flag_cube=True)

create_dataset_kwargs = {}
# L2 geocoded products require `grid_mapping` to reference the
# `projection` dataset
create_dataset_kwargs['grid_mapping'] = "projection"
Comment thread
gshiroma marked this conversation as resolved.
create_dataset_kwargs['chunk_size'] = chunk_size
create_dataset_kwargs['compression_enabled'] = compression_enabled
create_dataset_kwargs['compression_type'] = compression_type
Expand Down Expand Up @@ -911,11 +914,71 @@ def _get_raster_from_hdf5_ds(group, ds_name, dtype, shape,
long_name=None, descr=None,
units=None, fill_value=None,
valid_min=None, valid_max=None,
grid_mapping=None,
Comment thread
gshiroma marked this conversation as resolved.
chunk_size=(1,512,512),
compression_enabled=True,
compression_type='gzip',
compression_level=9,
shuffle_filter=True):
"""Create an HDF5 dataset and return an ISCE3 Raster backed by it.

The HDF5 dataset is created with the specified dimensions, data type,
metadata attributes, chunking, and compression settings. Optional
dimension scales are attached to the dataset.

Parameters
----------
group : h5py.Group
HDF5 group in which to create the dataset.
ds_name : str
Name of the HDF5 dataset.
dtype : numpy.dtype or type
Data type of the dataset.
shape : tuple
Shape of the dataset.
zds, yds, xds : h5py.Dataset, optional
Dimension-scale datasets to attach to the corresponding dimensions.
standard_name : str, optional
CF-compliant standard name for the dataset.
long_name : str, optional
Descriptive name for the dataset.
descr : str, optional
Description of the dataset.
units : str, optional
Units of the dataset values.
fill_value : scalar, optional
Dataset fill value. If not specified, NaN is used for floating-point
datasets and ``NaN + NaNj`` for complex-valued datasets.
valid_min, valid_max : scalar, optional
Minimum and maximum valid values for the dataset.
grid_mapping : str, optional
Name of the grid mapping coordinate variable (e.g., 'projection') that
defines the projection/CRS for this dataset per CF Convention 5.6.
Must reference an existing dataset in the same group. Typically required
for L2 geocoded products, and omitted for L1 radar geometry products.
Default: None.
chunk_size : tuple, optional
Target HDF5 chunk size. The actual chunk size may be adjusted to fit
within ``shape``. Set to ``None`` to disable chunking.
compression_enabled : bool, default=True
Whether to enable HDF5 compression.
compression_type : str, optional, default='gzip'
HDF5 compression filter to use.
compression_level : int, optional, default=9
Compression level passed to the HDF5 compression filter.
shuffle_filter : bool, default=True
Whether to enable the HDF5 shuffle filter when compression is enabled.

Returns
-------
isce3.io.Raster
ISCE3 Raster backed directly by the created HDF5 dataset.

Raises
------
ValueError
If compression is enabled and ``chunk_size`` is ``None``.
"""

create_dataset_kwargs = {}
if compression_enabled:
Expand Down Expand Up @@ -950,7 +1013,8 @@ def _get_raster_from_hdf5_ds(group, ds_name, dtype, shape,
if xds is not None:
dset.dims[2].attach_scale(xds)

dset.attrs['grid_mapping'] = np.bytes_("projection")
if grid_mapping is not None:
dset.attrs['grid_mapping'] = np.bytes_(grid_mapping)

if standard_name is not None:
dset.attrs['standard_name'] = np.bytes_(standard_name)
Expand Down
Loading