Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add updateRefCentroids and updateSourceCoords #79

Merged
merged 1 commit into from Jun 22, 2016
Merged

Conversation

r-owen
Copy link
Contributor

@r-owen r-owen commented Jun 22, 2016

Add two utility functions to lsst.afw.table:
updateRefCentroids and updateSourceCoords.
Add a unit test for these functions testTableUtils.py
(since the functions are defined in new module lsst.afw.table.utils)

self.assertPairsNearlyEqual(refCentroid, self.crpix)

# coord should not be changed
self.assertPairsNearlyEqual(self.refCat[0].get(self.refCoordKey), self.crval, maxDiff=0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't you be able to use assertEqual here, since coord really shouldn't be touched at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maxDiff=0 has the same effect, and I don't know if Coord supports operator==

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right, it's an afw object. Can you try it with equal and see what happens? I see "nearlyEqual" and think "something could have gotten jittered a bit", even with the maxDiff.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. I just checked and Coord does support operator== so this ought to work.

Add two utility functions to lsst.afw.table:
updateRefCentroids and updateSourceCoords.
Add a unit test for these functions testTableUtils.py
(since the functions are defined in new module lsst.afw.table.utils)
@r-owen r-owen merged commit 9aa9bd9 into master Jun 22, 2016
@ktlim ktlim deleted the tickets/DM-6566 branch August 25, 2018 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants