Skip to content

Commit

Permalink
Merge pull request #105 from lsst/tickets/DM-18751
Browse files Browse the repository at this point in the history
Use sample standard deviation for AMx.
  • Loading branch information
wmwv committed Aug 21, 2019
2 parents 5ca24d7 + 3d3e284 commit 3c94890
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/lsst/validate/drp/calcsrd/amx.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,10 @@ def magInRange(cat):
continue

finiteEntries, = np.where(np.isfinite(distances))
# Need at least 2 distances to get a nonzero stdev
# Need at least 2 distances to get a finite sample stdev
if len(finiteEntries) > 1:
rmsDist = np.std(np.array(distances)[finiteEntries])
# ddof=1 to get sample standard deviation (e.g., 1/(n-1))
rmsDist = np.std(np.array(distances)[finiteEntries], ddof=1)
rmsDistances.append(rmsDist)

# return quantity
Expand Down

0 comments on commit 3c94890

Please sign in to comment.