Skip to content

Commit

Permalink
Enhance sbas_pairs() function to include the limits in intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Pechnikov committed Feb 7, 2024
1 parent d02c14e commit 75c7f20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pygmtsar/pygmtsar/Stack_sbas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 75c7f20

Please sign in to comment.