Coverage for python/lsst/meas/algorithms/loadIndexedReferenceObjects.py : 87%

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-2017 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/>. #
dtype=str, default='cal_ref_cat', doc='Name of the ingested reference dataset' )
"""Load reference objects from an indexed catalog ingested by IngestIndexReferenceTask.
Parameters ---------- butler : `lsst.daf.persistence.Butler` Data butler for reading catalogs """
# This needs to come from the loader config, not the dataset_config since directory aliases can # change the path where the shards are found.
dataId=self.indexer.makeDataId('master_schema', self.ref_dataset_name), immediate=True) continue else:
# check for a catalog in a non-standard format if isinstance(refCat.schema["pm_ra"].asKey(), lsst.afw.table.KeyAngle): self.applyProperMotions(refCat, epoch) else: self.log.warn("Catalog pm_ra field is not an Angle; not applying proper motion")
# add and initialize centroid and hasCentroid fields (these are # added after loading to avoid wasting space in the saved catalogs) # the new fields are automatically initialized to (nan, nan) and # False so no need to set them explicitly
# make sure catalog is contiguous expandedCat = expandedCat.copy(True)
# return reference catalog refCat=expandedCat, fluxField=fluxField, )
"""Get shards by ID.
Parameters ---------- shardIdList : `list` of `int` A list of integer shard ids.
Returns ------- catalogs : `list` of `lsst.afw.table.SimpleCatalog` A list of reference catalogs, one for each entry in shardIdList. """ dataId=self.indexer.makeDataId(shardId, self.ref_dataset_name)): dataId=self.indexer.makeDataId(shardId, self.ref_dataset_name), immediate=True))
"""Trim a reference catalog to a circular aperture.
Parameters ---------- refCat : `lsst.afw.table.SimpleCatalog` Reference catalog to be trimmed. ctrCoord : `lsst.geom.SpherePoint` ICRS center of search region. radius : `lsst.geom.Angle` Radius of search region.
Returns ------- catalog : `lsst.afw.table.SimpleCatalog` Catalog containing objects that fall in the circular aperture. """ |