This adds some very nice improvements and clarifications. I just have a few minor comments and a request for more documentation.
pipe_tasks
imageDifference.py
- afwImage is imported but not used
- GetCoaddAsTemplateTask, GetCalexpAsTemplateTask can be imported from lsst.im.diffim; you don't need to go down into getTemplate to get to them, and doing so makes the code a bit less clear
- I suggest moving "import lsst.ip.diffim.utils as diUtils" to the top; the most important reason is to catch errors that prevent the module from being imported early, but it also reduces repetition and makes dependencies more obvious
ip_diffIm
getTemplate.py:
GetTemplateCoaddTask and GetCalexpAsTemplateTask
- These tasks are missing the doxygen comments that makes them show up on the main task documentation page. Please add that to make the tasks visible.
- The main doc strings are too brief; please fill these out as per our standard for tasks (including a brief example of how to run the task). If you are out of time for that now, please file a ticket so it does not get forgotten.
I suggest adding the configs to _all_ (in the past I have argued that it's just as good or better to get to the configs via the task's ConfigureClass method, but others disagree, and it certainly is true that it can be convenient to get to the configs directly).
imagePsfMatch.py:
ImagePsfMatchTask.makeCandidateList argument "candidateList": please document the two accepted data types in the @param description. When you refactor this code I hope you'll find you can require one of the two data types and make the user convert the other one, as it would simplify the API and the code. Also, with any luck you can clarify a function called makeCandidateList that take one kind of candidate list and return another – I find that really confusing, but not worth fixing on this ticket.
psfMatch.py
- pex.exceptions is imported but never used
Comments:
To goal of this ticket was to get the untested imageDifferenceTask running again. This ticket was tested on decam HiTs data and Stripe 82. This ticket is an intermediate step before the following work:
DM-3704DM-3515(The dependency was switched, as I got this running with the old DipoleMeasurement with a few minimal changes.)Russell, do you have time to review? Changes are on branch tickets/
DM-3213(NOTE: ignore the user branches as they present a different solution)obs_decam yusra$ git diff master.. --stat
policy/DecamMapper.paf | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 205 insertions(+)
obs_sdss yusra$ git diff master.. --stat
policy/SdssMapper.paf | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 112 insertions(+)
pipe_tasks yusra$ git diff master.. --stat
python/lsst/pipe/tasks/diffimGetTemplate.py | 174 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
python/lsst/pipe/tasks/imageDifference.py | 200 ++++++++++++++++++++++++++++---------------------------------------------------------------
2 files changed, 236 insertions(+), 138 deletions(-)
ip_diffim yusra$ git diff master.. --stat
python/lsst/ip/diffim/diaCatalogSourceSelector.py | 4 ++--
python/lsst/ip/diffim/diffimTools.py | 5 ++++-
python/lsst/ip/diffim/dipoleMeasurement.py | 9 ++++++---
python/lsst/ip/diffim/psfMatch.py | 2 +-
4 files changed, 13 insertions(+), 7 deletions(-)
Given that this is an intermediate step, some suggestions I will delay to
DM-3704. The ticket page has a running to do list.Aside from bug fixes, there was one substantive change in this ticket: Moving getTemplate to its own subtask. I would appreciate your advice in particular on
1) the task names:
module: diffimGetTemplate.py
2) How the configs are passed betweenthe subtask and ImageDifferenceTask.
self.makeSubtask("getTemplate")
if self.config.getTemplate == "GetTemplateSameCcdCalexpTask":
self.getTemplate.config.doAddCalexpBackground = self.config.doAddCalexpBackground