Most of my complaints here are on the git history, so I'm just going to put all of my comments here instead of on a GitHub PR. And I'm afraid I'm not quite ready to sign off on this yet; there are just too many trivial errors that should have been dealt with before this went out to review again, including some that I noted in my earlier review. On that note, I know you prefer to do the git history cleanup after the review (so I understand if many of the issues here were things you'd already planned to fix), but after this issue I'm convinced that's not really viable - it just makes the reviewer spend too much time commenting on things that the branch author might already be planning to fix, because there's no way of knowing what the branch author intended to fix at that point.
The git history in meas_base needs quite a bit of cleanup:
- You've got a merge from master in here, which should be replaced by a rebase on master (if you just do a "git rebase master", I think that should fix it).
- There's something weird going on with the new code in tests.py; you add it in one commit, remove it from the next, and then add it back in in the last (non-merge) one. From the commit messages, it looks like it should just be added in the first one.
- There's code in the first commit dealing with GaussianCentroid that looks like it belongs in the second one.
The comments and indentation around the new method in GaussianCentroid are a mess; we don't want that long line of asterisks running through the middle of the class, there are weird spaces in the rest of the comment, and the close paren is in the wrong place. And one of the lines is longer than 110 characters.
I mentioned in my earlier review that this was the time to remove the version 0 and workaround code. I haven't done a thorough search of what that entails myself, but it should include at least the Version0FlagMapper function and the _flagMap dict in base.py in meas_base.
The git history in meas_algorithms needs cleanup:
- There's another merge-from-master commit there that needs to go.
- Typos in the commit message for the transfer of sincPhotSums
There is a debug `writeFits` statement in `PsfAttributes.cc`, as well as some debug printing.
You've commented out some code around lines 43 of measAlgTasks.py; it looks like the original author put it there for a reason, so I'd like to see it uncommented. You've also added a "display=True" line that I suspect should be reverted.
Line 38 of ImagePsf.cc is commented out, but should just be removed.
These are the files I propose to remove from meas_algorithms. With some changes to a few files (PsfAttributes.cc, psfImage.cc, secondMomentStarSelector,py, SincFlux.cc, and several quick tests) I am able to get the remainder to compile with what is left. I have not yet tried to compile the rest of the stack.
nclude/lsst/meas/algorithms/Algorithm.h
include/lsst/meas/algorithms/ApertureFlux.h
include/lsst/meas/algorithms/CentroidControl.h
include/lsst/meas/algorithms/Classification.h
include/lsst/meas/algorithms/CorrectFluxes.h
include/lsst/meas/algorithms/FluxControl.h
include/lsst/meas/algorithms/GaussianFluxControl.h
include/lsst/meas/algorithms/Measure.h
include/lsst/meas/algorithms/PixelFlags.h
include/lsst/meas/algorithms/RecordCentroid.h
include/lsst/meas/algorithms/ScaledFlux.h
include/lsst/meas/algorithms/SdssShapeControl.h
include/lsst/meas/algorithms/ShapeControl.h
include/lsst/meas/algorithms/SkyCoord.h
include/lsst/meas/algorithms/detail/SdssShape.h
src/Classification.cc
src/CorrectFluxes.cc
src/Measure.cc
src/PixelFlags.cc
src/SkyCoord.cc
src/flux/ApertureFlux.cc
src/flux/EllipticalApertureFlux.cc`
src/flux/GaussianFlux.cc
src/flux/NaiveFlux.cc
src/flux/PeakLikelihoodFlux.cc
src/flux/PsfFlux.cc
src/centroid/GaussianCentroid.cc
src/centroid/NaiveCentroid.cc
src/centroid/RecordCentroid.cc
src/centroid/SdssCentroid.cc
src/centroid/twodg.cc
src/centroid/all.h
python/lsst/meas/algorithms/algorithmRegistry.py
python/lsst/meas/algorithms/measurement.py
tests/testsCorrectFluxes.py
tests/photometry.cc
test/photometryWithoutPsf.py
tests/sincPhotSums.py