Details
-
Type:
RFC
-
Status: Implemented
-
Resolution: Done
-
Component/s: DM
-
Labels:
Description
This is a set of closely related redefinitions and deprecation of fields in BasePsfDeterminerTask and its children classes pcaPsfDeterminerTask, psfexPsfDeterminerTask and piffPsfDeterminerTask.
The kernelSize config field in concrete classes is used differently from the documentation given in BasePsfDeterminerConfig. In psfexPsfDeterminerTask, if kernelSize<15, only then is it scaled by the median of the square root of the quadrupole moments as mentioned in the docstring and used to set the bounding box of the PSF candidates. If kernelSize>15, it is used without any modification (if samplingSize=1 for psfexPsfDeterminer). This is an undocumented behavior! Similarly, in pcaPsfDeterminerTask, if kernelSize>15, it is used without any modification (there is no samplingSize) and if kernelSize<15, it is scaled by the median of the square root of the semi-major axis computed from the quadrupole moments, which is a bug: https://github.com/lsst/meas_algorithms/blob/main/python/lsst/meas/algorithms/pcaPsfDeterminer.py#L273-L286
In piffPsfDeterminerTask, unlike the above two, the dimensions of the PSF candidates are not set explicitly within the determinePsf method. The dimensions are set to 21 (default) by the kernelSize parameter in makePsfCandidatesTask. This was completely overridden by pcaPsfDeterminer and psfexPsfDeterminer, making the config redundant.
Furthermore, because of the different interpretations of kernelSize, PSF models are rendered on postage stamps of size given by:
- kernelSize for PCA PSFs
- kernelSize * samplingSize for PSFEx PSFs
- kernelSize / samplingSize for PiFF PSFs
By default, samplingSize = 0.5 for PSFEx and 1 for PiFF. Thus, this makes translating kernelSize parameter to postage stamp size confusing and less straightforward. E.g., in the HSC RC2 dataset processed with PSFEx, with samplingSize=0.5, the kernelSize had to be set to 81 to make PSF candidates and the PSF model be 41x41 pixels in size.
Proposal:
1. Deprecate the kernelSize field in BasePsfDeterminerConfig.
2. Redefine kernelSize in makePsfCandidates to mean the exact size of the PSF candidate objects, i.e., size of the star image to consider to build PSF models.
3. Promote samplingSize (or a better named version of it) to be a config field in BasePsfDeterminerTask.
4. Define an optional stampSize config field in BasePsfDeterminerTask to mean the size (in native pixels) of the postage stamp when a PSF model gets rendered. This allows one to adjust the core of a PSF model from the extended wings of a star. The value must not exceed kernelSize and defaults to kernelSize.
5. Deprecate kernelSizeMin and kernelSizeMax in BasePsfDeterminerTask.
Planned end date is longer than typical, since I’m going to be a bit slow on DM-related tasks for the next few weeks and DMLT and no-meeting weeks are coming up.
Attachments
Issue Links
- is triggered by
-
DM-34531 Cleanup piff PSF determiner model size config options
- Done
- is triggering
-
DM-36071 Deprecate kernelSize* fields in PsfDeterminer configs
- Done
- relates to
-
DM-34698 Default piff kernelSize to 25
- Done
-
DM-36311 Remove deprecated kernelSize* parameters from PSF determiner tasks
- Done
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
Comments on individual proposals:
1) If you deprecate kernelSize in the base task, do the child tasks still have that field, with their own definitions of it, or is it supposed to be replaced with the `stampSize` defined in 4)?
2) Did you mean `makePsfCandidates`? And by redefine, do you mean "change the docsstring"?
3) Does this also include modifying psfex and piff to use `samplingSize` in the same way?
4) You refer to `kernelSize` here, but you deprecated it in 1)?
5) I assume pca and psfex both keep these min/max configs because they both do use them to check the calculated kernelSize?