Skip to content

Commit eb3423c

Browse files
committed
fix calculation of variance in sum1d()
1 parent 5ed3526 commit eb3423c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

gempy/library/nddops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,10 @@ def sum1d(ndd, x1, x2, proportional_variance=True):
650650
ndd.variance[ix1:ix2].sum() +
651651
(fx2 if proportional_variance else fx2*fx2)*ndd.variance[ix2])
652652
else:
653-
# calculate_variance returns the uncertainty on the mean
653+
# calculate_variance returns the standard error on the mean
654654
# mask=None because we ignore the mask is the above calculation
655655
var = NDStacker.calculate_variance(
656656
ndd.data[ix1+1:ix2, np.newaxis],
657-
mask=None, out_data=data/(x2-x1)) * (ix2 - ix1 - 1) ** 2
657+
mask=None, out_data=data/(x2-x1)) * (ix2 - ix1 - 1)
658658

659659
return NDD(data, mask, var)

0 commit comments

Comments
 (0)