capturing multiply stored station labels
This commit is contained in:
parent
e341994825
commit
724032b3f6
@ -127,10 +127,15 @@ def stations_from_pilot(stat_array):
|
|||||||
stations = list()
|
stations = list()
|
||||||
cur_stat = None
|
cur_stat = None
|
||||||
for stat in stat_array:
|
for stat in stat_array:
|
||||||
|
stat = stat.strip()
|
||||||
if stat == cur_stat:
|
if stat == cur_stat:
|
||||||
continue
|
continue
|
||||||
cur_stat = stat
|
cur_stat = stat
|
||||||
stations.append(stat.strip())
|
if stat not in stations:
|
||||||
|
stations.append(stat)
|
||||||
|
else:
|
||||||
|
warnings.warn('station {0} listed at least twice, might corrupt '
|
||||||
|
'phase times', RuntimeWarning)
|
||||||
|
|
||||||
return stations
|
return stations
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user