calcRmsDistances is comparing objects in correct distances due to indexing error

XMLWordPrintable

Details

• Type: Bug
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
0.2
• Team:
DM Science
• Urgent?:
No

Description

Alexandre Ciulli kindly points out that there's an indexing error in calcRmsDistances

1. Update validate_drp/python/lsst/validate/drp/calcsrd/amx.py to add back in the index offset in line 198-199

  dist = sphDist(ra1, dec1, meanRa[obj1+1:], meanDec[obj1+1:])  objectsInAnnulus, = np.where((annulusRadians[0] <= dist) &  (dist < annulusRadians[1])) 

to

  dist = sphDist(ra1, dec1, meanRa[obj1+1:], meanDec[obj1+1:])  objectsInAnnulus, = np.where((annulusRadians[0] <= dist) &  (dist < annulusRadians[1]))  objectsInAnnulus += obj1 + 1 

Or generalize/refactor in some other way to capture the index offset correctly.

Activity

Hide
Leanne Guy added a comment -

validate_drp has been replaced by faro, there will be no further development in validate_drp. This error however seems to have been propagated to faro.

Show
Leanne Guy added a comment - validate_drp has been replaced by faro, there will be no further development in validate_drp. This error however seems to have been propagated to faro.
Hide
Jeffrey Carlin added a comment -

The proposed change does indeed fix the issue. We may want to refactor this code to something more readable, but for now I have confirmed that the solution above works.

Show
Jeffrey Carlin added a comment - The proposed change does indeed fix the issue. We may want to refactor this code to something more readable, but for now I have confirmed that the solution above works.
Hide
Leanne Guy added a comment -

Show

People

Assignee:
Jeffrey Carlin
Reporter:
Michael Wood-Vasey
Reviewers:
Leanne Guy
Watchers:
Jeffrey Carlin, Keith Bechtol, Leanne Guy