[Bugfix] Merge traces treating overlaps as data instead of gaps
Could not open the Pickwindow on some stations. Gaps were merged so that overlapping values were marked as gaps, which lead to an error when those traces were processed. Method 1 takes data from traces instead, see https://docs.obspy.org/packages/autogen/obspy.core.trace.Trace.__add__.html
This commit is contained in:
parent
dfe3f9b32a
commit
5e6d2e7211
@ -870,7 +870,7 @@ def merge_stream(stream):
|
|||||||
if gaps:
|
if gaps:
|
||||||
# list of merged stations (seed_ids)
|
# list of merged stations (seed_ids)
|
||||||
merged = ['{}.{}.{}.{}'.format(*gap[:4]) for gap in gaps]
|
merged = ['{}.{}.{}.{}'.format(*gap[:4]) for gap in gaps]
|
||||||
stream.merge()
|
stream.merge(method=1)
|
||||||
print('Merged the following stations because of gaps:')
|
print('Merged the following stations because of gaps:')
|
||||||
for merged_station in merged:
|
for merged_station in merged:
|
||||||
print(merged_station)
|
print(merged_station)
|
||||||
|
@ -1233,7 +1233,7 @@ class PylotCanvas(FigureCanvas):
|
|||||||
gaps = st_select.get_gaps()
|
gaps = st_select.get_gaps()
|
||||||
if gaps:
|
if gaps:
|
||||||
merged = ['{}.{}.{}.{}'.format(*gap[:4]) for gap in gaps]
|
merged = ['{}.{}.{}.{}'.format(*gap[:4]) for gap in gaps]
|
||||||
st_select.merge()
|
st_select.merge(method=1)
|
||||||
print('Merged the following stations because of gaps:')
|
print('Merged the following stations because of gaps:')
|
||||||
for merged_station in merged:
|
for merged_station in merged:
|
||||||
print(merged_station)
|
print(merged_station)
|
||||||
|
Loading…
Reference in New Issue
Block a user