Skip to content

Commit

Permalink
Modify ap_pipe call for association.
Browse files Browse the repository at this point in the history
Comment out diaForcedSourceTask for now.

Fix ticket number in TODO.

Disable diaForcedSource test until DM-19906

Fix linting.
  • Loading branch information
morriscb committed Jun 11, 2019
1 parent 1054f17 commit 2d87f3b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
15 changes: 10 additions & 5 deletions python/lsst/ap/pipe/ap_pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,17 @@ def runAssociation(self, sensorRef):
catalog = sensorRef.get(diffType + "Diff_diaSrc")
diffim = sensorRef.get(diffType + "Diff_differenceExp")

dia_sources = self.diaSourceDpddifier.run(catalog, diffim)
dia_sources = self.diaSourceDpddifier.run(catalog,
diffim,
return_pandas=True)
result = self.associator.run(dia_sources, diffim, self.ppdb)
self.diaForcedSource.run(result.dia_objects,
sensorRef.get("ccdExposureId_bits"),
sensorRef.get("calexp"),
diffim)
# TODO: DM-19906
# Need to convert diaFourcedSource task to accept pandas.DataFrame
# as an input.
# self.diaForcedSource.run(result.dia_objects,
# sensorRef.get("ccdExposureId_bits"),
# sensorRef.get("calexp"),
# diffim)

return pipeBase.Struct(
l1Database=self.ppdb,
Expand Down
10 changes: 8 additions & 2 deletions tests/test_appipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ def testGenericRun(self):
subtasks.ccdProcessor.runDataRef.assert_called_once()
subtasks.differencer.runDataRef.assert_called_once()
subtasks.associator.run.assert_called_once()
subtasks.forcedSource.run.assert_called_once()
# TODO: DM-19906
# Disable this test until forcedSource can be used with
# pandas.
# subtasks.forcedSource.run.assert_called_once()

def testReuseExistingOutput(self):
"""Test reuse keyword to ApPipeTask.runDataRef.
Expand Down Expand Up @@ -166,7 +169,10 @@ def testCalexpRun(self):
self.assertEqual(subtasks.ccdProcessor.runDataRef.call_count, 2)
subtasks.differencer.runDataRef.assert_called_once()
subtasks.associator.run.assert_called_once()
subtasks.forcedSource.run.assert_called_once()
# TODO: DM-19906
# Disable this test until forcedSource can be used with
# pandas.
# subtasks.forcedSource.run.assert_called_once()


class MemoryTester(lsst.utils.tests.MemoryTestCase):
Expand Down

0 comments on commit 2d87f3b

Please sign in to comment.