Skip to content

Commit

Permalink
reduce set/list conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosgjs committed Jul 18, 2023
1 parent c53d4c4 commit 9203b24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/noisepy/seis/asdfstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ def get_timespans(self) -> List[DateTimeRange]:

def get_station_pairs(self) -> List[Tuple[Station, Station]]:
timespans = self.get_timespans()
pairs_all = []
pairs_all = set()
for timespan in timespans:
with self.datasets[timespan] as ccf_ds:
data = ccf_ds.auxiliary_data.list()
pairs_all.extend(parse_station_pair(p) for p in data if p != PROGRESS_DATATYPE)
return list(set(pairs_all))
pairs_all.update(parse_station_pair(p) for p in data if p != PROGRESS_DATATYPE)
return list(pairs_all)

def get_channeltype_pairs(
self, timespan: DateTimeRange, src_sta: Station, rec_sta: Station
Expand Down

0 comments on commit 9203b24

Please sign in to comment.