[change] replace NaN's in HOScf by first NaN value instead of zero

This commit is contained in:
Darius Arnold 2017-08-24 15:42:12 +02:00 committed by Marcel
parent 0852bf0f80
commit 5648fc1870

View File

@ -296,9 +296,11 @@ class HOScf(CharacteristicFunction):
elif self.getOrder() == 4:
LTA[j] = lta / np.power(lta1, 2)
nn = np.isnan(LTA)
if len(nn) > 1:
LTA[nn] = 0
# remove NaN's with first not-NaN-value,
# so autopicker doesnt pick discontinuity at start of the trace
ind = np.where(~np.isnan(LTA))[0]
first = ind[0]
LTA[:first] = LTA[first]
self.cf = LTA
self.xcf = x