Paul, would you mind giving this a review? The original error message I got was when trying to run the joinMatchListWithCatalog on a processCcd run of HSC's commissioning: --id visit=904028 ccd=9
afw.table WARNING: Persisted match record with ID 41874008000512 not found in catalog 1
|
I fudged this by increasing the RADIUS in the match metadata before calling joinMatchListWithCatalog:
packedMatches = butler.get(dataset + "Match", dataRef.dataId)
|
matchmeta = packedMatches.table.getMetadata()
|
rad = matchmeta.getDouble("RADIUS")
|
matchmeta.setDouble("RADIUS", rad*1.05, "field radius in degrees, approximate, padded")
|
Here I fix the issue by explicitly including the pixelMargin padding to the createMatchMetadata function in meas_astrom so that the same search radius will be used when unpersisting as was used in the initial matching.
Unfortunately, I cannot reproduce the error as the newly refactored processCcd.py does not have the same reference selection criteria as the old one (which was used when the above issue was encountered), and the issue does not actually occur for this dataId any longer. I can confirm, however, that the radius is indeed getting set accordingly in the match metadata:
Without DM-5686
|
In [24]: matchmeta.getDouble("RADIUS")
|
Out[24]: 0.0969113324124123
|
With DM-5686
|
In [25]: matchmeta2.getDouble("RADIUS")
|
Out[25]: 0.0995646234473273
|
I then noticed that this was still not quite the same radius or center as used when the references are loaded. This is because the match metadata was being set after the exposure's wcs has been updated. So, in order to ensure that the same sky circle is set in the match metadata, I moved the creation of it to prior to any wcs-altering steps. So now the persisting and unperesisting sky circles match:
processCcd.calibrate.astrometry.refObjLoader: Loading reference objects using center (1023.5, 2087.5) pix = Fk5Coord(319.5213234, 0.1444358, 2000.00) sky and radius 0.109031123234 deg
|
My debugging output from createMatchMetadata
|
createMatchMetadata: crtCoord = IcrsCoord(319.5213234, 0.1444358)
|
createMatchMetadata: approxRadius = 0.109031123234
|
Jenkins is happy.
Paul, would you mind giving this a review? The original error message I got was when trying to run the joinMatchListWithCatalog on a processCcd run of HSC's commissioning: --id visit=904028 ccd=9
afw.table WARNING: Persisted match record with ID 41874008000512 not found in catalog 1
I fudged this by increasing the RADIUS in the match metadata before calling joinMatchListWithCatalog:
packedMatches = butler.get(dataset + "Match", dataRef.dataId)
matchmeta = packedMatches.table.getMetadata()
rad = matchmeta.getDouble("RADIUS")
matchmeta.setDouble("RADIUS", rad*1.05, "field radius in degrees, approximate, padded")
Here I fix the issue by explicitly including the pixelMargin padding to the createMatchMetadata function in meas_astrom so that the same search radius will be used when unpersisting as was used in the initial matching.
Unfortunately, I cannot reproduce the error as the newly refactored processCcd.py does not have the same reference selection criteria as the old one (which was used when the above issue was encountered), and the issue does not actually occur for this dataId any longer. I can confirm, however, that the radius is indeed getting set accordingly in the match metadata:
Without DM-5686
In [24]: matchmeta.getDouble("RADIUS")
Out[24]: 0.0969113324124123
With DM-5686
In [25]: matchmeta2.getDouble("RADIUS")
Out[25]: 0.0995646234473273
I then noticed that this was still not quite the same radius or center as used when the references are loaded. This is because the match metadata was being set after the exposure's wcs has been updated. So, in order to ensure that the same sky circle is set in the match metadata, I moved the creation of it to prior to any wcs-altering steps. So now the persisting and unperesisting sky circles match:
processCcd.calibrate.astrometry.refObjLoader: Loading reference objects using center (1023.5, 2087.5) pix = Fk5Coord(319.5213234, 0.1444358, 2000.00) sky and radius 0.109031123234 deg
My debugging output from createMatchMetadata
createMatchMetadata: crtCoord = IcrsCoord(319.5213234, 0.1444358)
createMatchMetadata: approxRadius = 0.109031123234
Jenkins is happy.