From 75c7f205a5cf4e3e86fe46f5ed3be5883eba2e90 Mon Sep 17 00:00:00 2001 From: Alexey Pechnikov Date: Wed, 7 Feb 2024 19:45:03 +0700 Subject: [PATCH] Enhance sbas_pairs() function to include the limits in intervals --- pygmtsar/pygmtsar/Stack_sbas.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygmtsar/pygmtsar/Stack_sbas.py b/pygmtsar/pygmtsar/Stack_sbas.py index 2045db7f..34f2d1c1 100644 --- a/pygmtsar/pygmtsar/Stack_sbas.py +++ b/pygmtsar/pygmtsar/Stack_sbas.py @@ -333,7 +333,7 @@ def sbas_pairs_limit(self, pairs, limit=2, iterations=1): print ('TODO: process upper limit') return df - + def sbas_pairs(self, days=100, meters=None, invert=False): """ Generates a sorted list of baseline pairs based on specified temporal and spatial criteria. @@ -390,9 +390,9 @@ def baseline_table(): counter = 0 for line2 in tbl.itertuples(): #print (line1, line2) - if not (line1.Index < line2.Index and (line2.Index - line1.Index).days < days): + if not (line1.Index < line2.Index and (line2.Index - line1.Index).days < days + 1): continue - if meters is not None and not (abs(line1.BPR - line2.BPR)< meters): + if meters is not None and not (abs(line1.BPR - line2.BPR)< meters + 1): continue counter += 1