Commit 0d6f1cdc authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

modify 'extend_incomplete' to fill with median rather than zeros

parent 6e4f9931
...@@ -403,11 +403,17 @@ class Dataset(object): ...@@ -403,11 +403,17 @@ class Dataset(object):
if extend_incomplete and len(trs) == 1: if extend_incomplete and len(trs) == 1:
trs[0].extend( trs[0].extend(
tmin + toffset_noise_extract - tpad, tmin + toffset_noise_extract - tpad,
tmax + toffset_noise_extract + tpad) tmax + toffset_noise_extract + tpad,
fillmethod='median')
if not want_incomplete and len(trs) != 1: if not want_incomplete and len(trs) != 1:
if len(trs) == 0:
message = 'waveform missing or incomplete'
else:
message = 'waveform has gaps'
raise NotFound( raise NotFound(
'waveform missing or incomplete', message,
codes=(net, sta, loc, cha), codes=(net, sta, loc, cha),
time_range=( time_range=(
tmin + toffset_noise_extract - tpad, tmin + toffset_noise_extract - tpad,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment