Skip to content

Commit

Permalink
Responded to reviewer.
Browse files Browse the repository at this point in the history
Wrapped the output of DIAObjectCollection.get_object_ids as a list.
  • Loading branch information
morriscb committed Oct 3, 2017
1 parent 340717f commit cabfc4d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions python/lsst/ap/association/association.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def run(self, dia_sources, exposure):
Input exposure metadata containing the bounding box for this
exposure.
"""
# Assure we have a Box2D and can use the getCenter method.
bbox = afwGeom.Box2D(exposure.getBBox())
wcs = exposure.getWcs()
ctr_coord = wcs.pixelToSky(bbox.getCenter())
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/ap/association/dia_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_dia_object_ids(self):
------
A list of ints
"""
return self._id_to_index.keys()
return list(self._id_to_index.keys())

def update_dia_objects(self, force=False):
""" Update the summary statistics of all DIAObjects in this
Expand Down
4 changes: 2 additions & 2 deletions tests/test_dia_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def test_score_and_match(self):
0.1 * src_idx,
-1)
score_struct = obj_collection.score(
src_cat, afwGeom.Angle(1.0, units=afwGeom.arcseconds))
src_cat, 1.0 * afwGeom.arcseconds)

self.assertFalse(np.isfinite(score_struct.scores[-1]))
for src_idx in range(4):
Expand Down Expand Up @@ -217,7 +217,7 @@ def test_empty_dia_collection(self):
for src_idx in range(5):
# Our scores should be extremely close to 0 but not exactly so due
# to machine noise.
self.assertFalse(np.isfinite(score_struct.scores[src_idx]))
self.assertTrue(np.isinf(score_struct.scores[src_idx]))

updated_indices = dia_collection.match(src_cat, score_struct)
self.assertEqual(len(updated_indices), 5)
Expand Down

0 comments on commit cabfc4d

Please sign in to comment.