Skip to content

Commit

Permalink
Check for at least 2 visits in AMx calc
Browse files Browse the repository at this point in the history
before including a pair's distance stdev. The distance of a pair that
appears in only one visit has a std of zero, biasing the median RMS
if used.
  • Loading branch information
yalsayyad committed Mar 29, 2019
1 parent 32884e2 commit 015ca72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/lsst/validate/drp/calcsrd/amx.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ def magInRange(cat):
continue

finiteEntries, = np.where(np.isfinite(distances))
if len(finiteEntries) > 0:
# Need at least 2 distances to get a nonzero stdev
if len(finiteEntries) > 1:
rmsDist = np.std(np.array(distances)[finiteEntries])
rmsDistances.append(rmsDist)

Expand Down

0 comments on commit 015ca72

Please sign in to comment.