Skip to content

Commit

Permalink
Allow Goldstein filtering in square window for single-looking interfe…
Browse files Browse the repository at this point in the history
…rograms too.
  • Loading branch information
AlexeyPechnikov committed Feb 20, 2024
1 parent 0e97ce4 commit 3863548
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pygmtsar/pygmtsar/Stack_phasediff.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ def compute_interferogram(self, pairs, name, resolution=None, weight=None, phase

# single-look interferogram processing has a limited set of arguments
# resolution, coarsen, and psize are not applicable here
def compute_interferogram_singlelook(self, pairs, name, weight=None, phase=None, wavelength=None,
def compute_interferogram_singlelook(self, pairs, name, weight=None, phase=None, wavelength=None, psize=None,
queue=16, timeout=None, debug=False):
self.compute_interferogram(pairs, name, weight=weight, phase=phase, wavelength=wavelength,
queue=queue, timeout=timeout, debug=debug)
psize=psize, queue=queue, timeout=timeout, debug=debug)

# Goldstein filter requires square grid cells means 1:4 range multilooking.
# For multilooking interferogram we can use square grid always using coarsen = (1,4)
Expand Down Expand Up @@ -773,7 +773,9 @@ def apply_goldstein_filter(data, corr, psize):

assert phase.shape == corr.shape, 'ERROR: phase and correlation variables have different shape'
spacing = self.get_spacing(phase)
assert np.round(spacing[0]/spacing[1]) == 1, f'ERROR: grid cells should be almost square: {spacing}'
#assert np.round(spacing[0]/spacing[1]) == 1, f'ERROR: grid cells should be almost square: {spacing}'
if not np.round(spacing[0]/spacing[1]) == 1:
print (f'NOTE: grid cells are not close to square as expected: {spacing}')

if len(phase.dims) == 2:
stackvar = None
Expand Down

0 comments on commit 3863548

Please sign in to comment.