Closedown

This commit is contained in:
gobbo_a
2017-05-05 10:09:57 +02:00
parent c1ff5e2fa6
commit e212aed88f
2 changed files with 11 additions and 10 deletions

View File

@@ -34,11 +34,12 @@ def blm_remove_spikes(x):
# 1 point spike
x[i+2] = (x[i:i+5].sum() - x[i+2])/4
if d_x[i+1] > 0.5 * maximum and d_x[i+2] >= -0.5 * maximum:
print ("B")
if d_x[i+1] > 0.5 * maximum and d_x[i+2] >= -0.5 * maximum:
# 2 point spikes
x[i+2] = (x[i:i+2].sum() + x[i+4])/3
print ("C")
x[i+3] = (x[i+1] + x[i+4:i+6].sum())/3
print ("D")
# Handle edge points
if d_x[-1] > 0.5 * maximum:
x[-1] = x[-3:-1].sum() / 2