Retarget() function no longer available in LoadReferenceObjectsConfig object

Hello,
When upgrading from stack weekly w_2022_29 to w_2022_50, I note that the retarget() function is no longer available in the LoadReferenceObjectsConfig object.

Here is the beginning of my charImgConfig.py file:

from lsst.meas.algorithms import LoadIndexedReferenceObjectsTask
from lsst.utils import getPackageDir
import lsstDebug
import lsst.meas.extensions.psfex.psfexPsfDeterminer
import lsst.meas.modelfit
import lsst.meas.extensions.photometryKron

config.refObjLoader.retarget(LoadIndexedReferenceObjectsTask)

Which now gives the following error :

*** AttributeError: 'LoadReferenceObjectsConfig' object has no attribute 'retarget'

Does someone know what is the new syntax for this ?
Regards,

RĂ©mi

config.refObjLoader is now a ConfigField rather than a ConfigurableField, so it cannot be retarget-ed. But it was targeted at LoadIndexedReferenceObjectsTask before, so you shouldn’t have needed to change the default. You should just be able to remove your retarget line, and it will Just Work.

1 Like

To elaborate a bit more: refcat loading now happens in runQuantum, and there is nothing to retarget, as all reference catalogs are in HTM format and are handled by the one ReferenceObjectLoader. You can still configure it as before (e.g. to require proper motion corrections, or set up your filter maps).