While attempting to clean up the starSelector/sourceSelector API, Chris Morrison and I noticed that most uses of starSelectors were calling selectStars instead of run, meaning they were skipping the fact that starSelctor.run() calls makePsfCandidates after selecting stars. If someone called run() the returned catalog might be different from just calling selectStars() because of the effect of makePsfCandidates() (which is not a catalog action). It would greatly simplify our new API (
RFC-198) if we had a separate MakePsfCandidatesTask.
The one non-unittest (MeasurePsfTask) that we could find that currently uses starSelector.run() would be changed to do:
This should also allow us to deal with DM-5680 and DM-5578, by just using that task in the places where we have that repeated code block. It also fully decouples selecting stars (for whatever purpose) from creating psf candidates, and means our uses of sourceSelectors can be brought in line with RFC-352 by calling run() instead of selectStars()
Think of this as the logical continuation of
RFC-154, which started the process of cleaning up our starSelectors.
As a short pair coding exercise, Chris Morrison and I already done most of the necessary prep work in
DM-14102, if you want to see what the implementation would look like. This is also what triggered the filing of RFC-475.