Fix rounding errors (fixes #9)
parent
2a21c6f2a8
commit
52864f2269
|
@ -164,7 +164,9 @@ class fourframe:
|
|||
"""Create a selection mask"""
|
||||
c1 = ndimage.uniform_filter(self.znum, 3, mode='constant')
|
||||
c2 = ndimage.uniform_filter(self.znum*self.znum, 3, mode='constant')
|
||||
z = np.sqrt(c2-c1*c1)
|
||||
|
||||
# Add epsilon to keep square root positive
|
||||
z = np.sqrt(c2-c1*c1+1e-9)
|
||||
|
||||
# Standard deviation mask
|
||||
c = z < zstd
|
||||
|
|
Loading…
Reference in New Issue