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

DM-15795: Create DiaForcedSourceTask #37

Merged
merged 1 commit into from
Feb 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 14 additions & 4 deletions python/lsst/ap/pipe/ap_pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from lsst.pipe.tasks.imageDifference import ImageDifferenceTask
from lsst.ap.association import (
AssociationTask,
DiaForcedSourceTask,
MapDiaSourceTask,
make_dia_object_schema,
make_dia_source_schema)
Expand Down Expand Up @@ -68,6 +69,11 @@ class ApPipeConfig(pexConfig.Config):
target=AssociationTask,
doc="Task used to associate DiaSources with DiaObjects.",
)
diaForcedSource = pexConfig.ConfigurableField(
target=DiaForcedSourceTask,
doc="Task used for force photometer DiaObject locations in direct and "
"difference images.",
)

def setDefaults(self):
"""Settings appropriate for most or all ap_pipe runs.
Expand Down Expand Up @@ -278,10 +284,14 @@ def runAssociation(self, sensorRef):
diffType = self.config.differencer.coaddName

catalog = sensorRef.get(diffType + "Diff_diaSrc")
exposure = sensorRef.get(diffType + "Diff_differenceExp")

dia_sources = self.diaSourceDpddifier.run(catalog, exposure)
result = self.associator.run(dia_sources, exposure, self.ppdb)
diffim = sensorRef.get(diffType + "Diff_differenceExp")

dia_sources = self.diaSourceDpddifier.run(catalog, diffim)
result = self.associator.run(dia_sources, diffim, self.ppdb)
self.diaForcedSource(result.dia_objects,
sensorRef.get("ccdExposureId_bits"),
sensorRef.get("calexp"),
diffim)

return pipeBase.Struct(
l1Database=self.ppdb,
Expand Down