isce-framework / isce-framework/isce3
(InSAR) min/max/mean/std metrics do not account for the mask
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 239
- Forks
- 90
- Avg merge
- 13d 1h
- Merged PRs (30d)
- 5
Description
Currently, the min/max/mean/std metrics provided in InSAR products do not account for the subswath mask. Should we instead be masking out pixels from invalid regions between subswaths (constant PRF), and masking out pixels with coverage from only one input RSLC, when computing these metrics?
@xhuang-jpl can probably comment on how widespread through the InSAR products this concern is; I have only spot-checked.
Here is an example from one of the sample products (dithered dataset):
# Open NISAR Sample GUNW product
>>> f = h5py.File("../NISAR_L2_PR_GUNW_003_064_D_130_004_7700_SH_20251021T160803_20251021T160836_20251102T160804_20251102T160837_X05007_N_P_J_001.h5", "r")
# Recompute mean; Compare to stored attribute value
>>> ds = f["/science/LSAR/GUNW/grids/frequencyA/unwrappedInterferogram/HH/unwrappedPhase"]
>>> np.nanmean(ds[()])
np.float32(50.597443)
>>> ds.attrs["mean_value"][()]
np.float64(50.36126708984375)
# Recompute mean with the mask applied
>>> mask = f["/science/LSAR/GUNW/grids/frequencyA/unwrappedInterferogram/mask"][()]
>>> third_digit = mask % 10
>>> second_digit = (mask // 10) % 10
>>> result = np.where((second_digit > 0) & (third_digit > 0), ds, np.nan)
>>> np.nanmean(result)
np.float32(51.03899)
cc: @hfattahi @xhuang-jpl @seongsujeong @oberonia78
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the stored and recomputed values for the sample GUNW product, using the unwrappedPhase and mask datasets under /science/LSAR/GUNW/grids/frequencyA. Compare the current metrics with values that exclude invalid subswath regions and pixels covered by only one input RSLC. Done means the affected InSAR product metrics consistently account for the agreed mask criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100