Project: datamanagement
Issue DM-3633: Add readMatches back to meas_astrom
Recent changes to meas_astrom accidentally removed a function readMatches (copied below). Please restore it, preferably in its own module (though if someday we have more small python functions we may want a utils.py module). Also please include a unit test. {code} def readMatches(butler, dataId, sourcesName='icSrc', matchesName='icMatch', config=MeasAstromConfig(), sourcesFlags=afwTable.SOURCE_IO_NO_FOOTPRINTS): """Read matches, sources and catalogue; combine. @param butler Data butler @param dataId Data identifier for butler @param sourcesName Name for sources from butler @param matchesName Name for matches from butler @param sourcesFlags Flags to pass for source retrieval @returns Matches """ sources = butler.get(sourcesName, dataId, flags=sourcesFlags) packedMatches = butler.get(matchesName, dataId) astrom = Astrometry(config) return astrom.joinMatchListWithCatalog(packedMatches, sources) {code}
Story points: 4