Skip to content

Commit 29a7d4a

Browse files
committed
change masking logic to consider constant PRF cases
1 parent 20dc89c commit 29a7d4a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

prep/NISAR_prep.ipynb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,12 @@
429429
" x = f[f\"/science/LSAR/GUNW/grids/frequencyA/unwrappedInterferogram/{pol}/xCoordinates\"][:]\n",
430430
" y = f[f\"/science/LSAR/GUNW/grids/frequencyA/unwrappedInterferogram/{pol}/yCoordinates\"][:]\n",
431431
" mask_raw = f[f\"/science/LSAR/GUNW/grids/frequencyA/unwrappedInterferogram/mask\"][()]\n",
432-
" mask = np.where(mask_raw != 11, 0, 1)\n",
432+
"\n",
433+
" water_mask = (mask_raw // 100) == 1\n",
434+
" ref_subswath = (mask_raw // 10) % 10\n",
435+
" sec_subswath = mask_raw % 10\n",
436+
" is_valid = (ref_subswath > 0) & (sec_subswath > 0)\n",
437+
" mask = (is_valid) & ~water_mask\n",
433438
"\n",
434439
"dx = float(x[1] - x[0])\n",
435440
"dy = float(y[1] - y[0])\n",

0 commit comments

Comments
 (0)