Coverage for python/lsst/meas/astrom/ref_match.py : 91%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# # LSST Data Management System # Copyright 2008-2016 AURA/LSST. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the LSST License Statement and # the GNU General Public License along with this program. If not, # see <https://www.lsstcorp.org/LegalNotices/>. #
target=MatchOptimisticBTask, doc="reference object/source matcher", ) doc="the maximum match distance is set to " " mean_match_distance + matchDistanceSigma*std_dev_match_distance; " + "ignored if not fitting a WCS", dtype=float, default=2, min=0, ) doc="Selection of science sources") doc="Selection of reference sources")
# The following block adds links to this task from the Task Documentation page. ## \addtogroup LSST_task_documentation ## \{ ## \page measAlgorithms_RefMatchTask ## \ref RefMatchTask_ "RefMatchTask" ## Basic functionality for all calibration tasks: i.e. a matcher ## \}
"""!Match an input source catalog with objects from a reference catalog
@anchor RefMatchTask_ """
"""!Construct a RefMatchTask
@param[in] refObjLoader A reference object loader object @param[in] schema ignored; available for compatibility with an older astrometry task @param[in] kwargs additional keyword arguments for pipe_base Task.\_\_init\_\_ """
def loadAndMatch(self, exposure, sourceCat): """!Load reference objects overlapping an exposure and match to sources detected on that exposure
@param[in] exposure exposure that the sources overlap @param[in] sourceCat catalog of sources detected on the exposure (an lsst.afw.table.SourceCatalog)
@return an lsst.pipe.base.Struct with these fields: - refCat reference object catalog of objects that overlap the exposure (with some margin) (an lsst::afw::table::SimpleCatalog) - matches a list of lsst.afw.table.ReferenceMatch - matchMeta metadata needed to unpersist matches (an lsst.daf.base.PropertyList)
@note ignores config.matchDistanceSigma """
bbox=expMd.bbox, wcs=expMd.wcs, filterName=expMd.filterName, calib=expMd.calib, )
bbox=expMd.bbox, wcs=expMd.wcs, filterName=expMd.filterName, calib=expMd.calib, )
refCat=refSelection.sourceCat, sourceCat=sourceSelection.sourceCat, wcs=expMd.wcs, refFluxField=loadRes.fluxField, match_tolerance=None, )
"Found %d matches with scatter = %0.3f +- %0.3f arcsec; " % (len(matchRes.matches), distStats.distMean.asArcseconds(), distStats.distStdDev.asArcseconds()) )
frame = int(debug.frame) displayAstrometry( refCat=refSelection.sourceCat, sourceCat=sourceSelection.sourceCat, matches=matchRes.matches, exposure=exposure, bbox=expMd.bbox, frame=frame, title="Matches", )
refCat=loadRes.refCat, refSelection=refSelection, sourceSelection=sourceSelection, matches=matchRes.matches, matchMeta=matchMeta, )
"""Compute on-sky radial distance statistics for a match list
@param[in] matchList list of matches between reference object and sources; the distance field is the only field read and it must be set to distance in radians
@return a pipe_base Struct containing these fields: - distMean clipped mean of on-sky radial separation - distStdDev clipped standard deviation of on-sky radial separation - maxMatchDist distMean + self.config.matchDistanceSigma*distStdDev """ distMean=distMean, distStdDev=distStdDev, maxMatchDist=distMean + self.config.matchDistanceSigma*distStdDev, )
"""!Extract metadata from an exposure
@return an lsst.pipe.base.Struct containing the following exposure metadata: - bbox: parent bounding box - wcs: WCS (an lsst.afw.geom.Wcs) - calib calibration (an lsst.afw.image.Calib), or None if unknown - filterName: name of filter, or None if unknown """ filterName = None bbox=exposure.getBBox(), wcs=exposureInfo.getWcs(), calib=exposureInfo.getCalib() if exposureInfo.hasCalib() else None, filterName=filterName, ) |