Details
-
Type:
Improvement
-
Status: Invalid
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: meas_algorithms
-
Labels:
-
Story Points:2
Description
The code to make PSF candidates is too complicated and repeated in too many places (even after DM-5532). Every time lsst.meas.algorithms.makePsfCandidate is called (except in a few tests) it is called as follows:
cand = measAlg.makePsfCandidate(source, mi)
|
if cand.getWidth() == 0:
|
cand.setBorderWidth(borderWidth)
|
cand.setWidth(kernelSize + 2*borderWidth)
|
cand.setHeight(kernelSize + 2*borderWidth)
|
|
im = cand.getMaskedImage().getImage()
|
max = afwMath.makeStatistics(im, afwMath.MAX).getValue()
|
if not numpy.isfinite(max):
|
continue
|
This should to be centralized somewhere. I suggest adding this code to meas.algorithms.makePsfCandidate itself (which could delegate some work to a private function, if desired).
Attachments
Issue Links
- duplicates
-
DM-14102 Move makePsfCandidates into its own task
- Done
- relates to
-
DM-5680 makePsfCandidate needs to be easier and safer to use
- To Do
-
DM-19155 Redesign PsfCandidate
- To Do
-
RFC-477 Convert makePsfCandidates into its own task
- Implemented
-
DM-5532 Change star selectors to return stars instead of PSF candidates
- Done
I'm closing this as a duplicate of
DM-14102, which seems to have moved this oft-duplicated code block into a new MakePsfCandidateTask.