LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
|
Public Member Functions | |
__init__ (self, dataIds, refCats, name=None, log=None, config=None) | |
applyProperMotions (self, catalog, epoch) | |
getMetadataBox (self, bbox, wcs, filterName, epoch=None, bboxToSpherePadding=100) | |
loadPixelBox (self, bbox, wcs, filterName, epoch=None, bboxToSpherePadding=100) | |
loadRegion (self, region, filterName, filtFunc=None, epoch=None) | |
loadSkyCircle (self, ctrCoord, radius, filterName, epoch=None) | |
Static Public Member Functions | |
getMetadataCircle (coord, radius, filterName, epoch=None) | |
Public Attributes | |
config | |
dataIds | |
refCats | |
name | |
log | |
Static Public Attributes | |
ConfigClass = LoadReferenceObjectsConfig | |
Static Protected Member Functions | |
_remapReferenceCatalogSchema (refCat, *anyFilterMapsToThis=None, filterMap=None, centroids=False) | |
_addFluxAliases (schema, anyFilterMapsToThis=None, filterMap=None) | |
_makeBoxRegion (BBox, wcs, BBoxPadding) | |
_calculateCircle (bbox, wcs, pixelMargin) | |
This class facilitates loading reference catalogs. The QuantumGraph generation will create a list of datasets that may possibly overlap a given region. These datasets are then used to construct an instance of this class. The class instance should then be passed into a task which needs reference catalogs. These tasks should then determine the exact region of the sky reference catalogs will be loaded for, and call a corresponding method to load the reference objects. Parameters ---------- dataIds : iterable of `lsst.daf.butler.DataCoordinate` An iterable object of data IDs that point to reference catalogs. refCats : iterable of `lsst.daf.butler.DeferredDatasetHandle` Handles to load refCats on demand. name : `str`, optional The name of the refcat that this object will load. This name is used for applying colorterms, for example. config : `LoadReferenceObjectsConfig` Configuration of this reference loader. log : `lsst.log.Log`, `logging.Logger` or `None`, optional Logger object used to write out messages. If `None` a default logger will be used.
Definition at line 159 of file loadReferenceObjects.py.
lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.__init__ | ( | self, | |
dataIds, | |||
refCats, | |||
name = None, | |||
log = None, | |||
config = None ) |
Definition at line 186 of file loadReferenceObjects.py.
|
staticprotected |
Add aliases for camera filter fluxes to the schema. For each camFilter: refFilter in filterMap, adds these aliases: <camFilter>_camFlux: <refFilter>_flux <camFilter>_camFluxErr: <refFilter>_fluxErr, if the latter exists or sets `anyFilterMapsToThis` in the schema. Parameters ---------- schema : `lsst.afw.table.Schema` Schema for reference catalog. anyFilterMapsToThis : `str`, optional Always use this reference catalog filter. Mutually exclusive with `filterMap`. filterMap : `dict` [`str`,`str`], optional Mapping of camera filter name: reference catalog filter name. Mutually exclusive with `anyFilterMapsToThis`. Raises ------ RuntimeError Raised if any required reference flux field is missing from the schema.
Definition at line 301 of file loadReferenceObjects.py.
|
staticprotected |
Compute on-sky center and radius of search region. Parameters ---------- bbox : `lsst.geom.Box2I` or `lsst.geom.Box2D` Pixel bounding box. wcs : `lsst.afw.geom.SkyWcs` WCS; used to convert pixel positions to sky coordinates. pixelMargin : `int` Padding to add to 4 all edges of the bounding box (pixels). Returns ------- results : `lsst.pipe.base.Struct` A Struct containing: - coord : `lsst.geom.SpherePoint` ICRS center of the search region. - radius : `lsst.geom.Angle` Radius of the search region. - bbox : `lsst.geom.Box2D` Bounding box used to compute the circle.
Definition at line 404 of file loadReferenceObjects.py.
|
staticprotected |
Definition at line 367 of file loadReferenceObjects.py.
|
staticprotected |
This function takes in a reference catalog and returns a new catalog with additional columns defined from the remaining function arguments. Parameters ---------- refCat : `lsst.afw.table.SimpleCatalog` Reference catalog to map to new catalog anyFilterMapsToThis : `str`, optional Always use this reference catalog filter. Mutually exclusive with `filterMap` filterMap : `dict` [`str`,`str`], optional Mapping of camera filter name: reference catalog filter name. centroids : `bool`, optional Add centroid fields to the loaded Schema. ``loadPixelBox`` expects these fields to exist. Returns ------- expandedCat : `lsst.afw.table.SimpleCatalog` Deep copy of input reference catalog with additional columns added
Definition at line 254 of file loadReferenceObjects.py.
lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.applyProperMotions | ( | self, | |
catalog, | |||
epoch ) |
Apply proper motion correction to a reference catalog. Adjust position and position error in the ``catalog`` for proper motion to the specified ``epoch``, modifying the catalog in place. Parameters ---------- catalog : `lsst.afw.table.SimpleCatalog` Catalog of positions, containing at least these fields: - Coordinates, retrieved by the table's coordinate key. - ``coord_raErr`` : Error in Right Ascension (rad). - ``coord_decErr`` : Error in Declination (rad). - ``pm_ra`` : Proper motion in Right Ascension (rad/yr, East positive) - ``pm_raErr`` : Error in ``pm_ra`` (rad/yr), optional. - ``pm_dec`` : Proper motion in Declination (rad/yr, North positive) - ``pm_decErr`` : Error in ``pm_dec`` (rad/yr), optional. - ``epoch`` : Mean epoch of object (an astropy.time.Time) epoch : `astropy.time.Time` Epoch to which to correct proper motion. If None, do not apply PM corrections or raise if ``config.requireProperMotion`` is True. Raises ------ RuntimeError Raised if ``config.requireProperMotion`` is set but we cannot apply the proper motion correction for some reason.
Definition at line 195 of file loadReferenceObjects.py.
lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.getMetadataBox | ( | self, | |
bbox, | |||
wcs, | |||
filterName, | |||
epoch = None, | |||
bboxToSpherePadding = 100 ) |
Return metadata about the loaded reference catalog, in an on-detector box. This metadata is used for reloading the catalog (e.g., for reconstituting a normalised match list). Parameters ---------- bbox : `lsst.geom.Box2I` or `lsst.geom.Box2D` Bounding box for the pixels. wcs : `lsst.afw.geom.SkyWcs` The WCS object associated with ``bbox``. filterName : `str` Name of the camera filter. epoch : `astropy.time.Time` or `None`, optional Epoch that proper motion and parallax were corrected to, or `None` if no such corrections were applied. bboxToSpherePadding : `int`, optional Padding in pixels to account for translating a set of corners into a spherical (convex) boundary that is certain to encompass the enitre area covered by the box. Returns ------- md : `lsst.daf.base.PropertyList` The metadata detailing the search parameters used for this dataset.
Definition at line 472 of file loadReferenceObjects.py.
|
static |
Return metadata about the loaded reference catalog, in an on-sky circle. This metadata is used for reloading the catalog (e.g. for reconstituting a normalized match list). Parameters ---------- coord : `lsst.geom.SpherePoint` ICRS center of the search region. radius : `lsst.geom.Angle` Radius of the search region. filterName : `str` Name of the camera filter. epoch : `astropy.time.Time` or `None`, optional Epoch that proper motion and parallax were corrected to, or `None` if no such corrections were applied. Returns ------- md : `lsst.daf.base.PropertyList` Metadata about the catalog.
Definition at line 435 of file loadReferenceObjects.py.
lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.loadPixelBox | ( | self, | |
bbox, | |||
wcs, | |||
filterName, | |||
epoch = None, | |||
bboxToSpherePadding = 100 ) |
Load reference objects that are within a pixel-based rectangular region. This algorithm works by creating a spherical box whose corners correspond to the WCS converted corners of the input bounding box (possibly padded). It then defines a filtering function which looks at the pixel position of the reference objects and accepts only those that lie within the specified bounding box. The spherical box region and filtering function are passed to the generic loadRegion method which loads and filters the reference objects from the datastore and returns a single catalog containing the filtered set of reference objects. Parameters ---------- bbox : `lsst.geom.Box2I` or `lsst.geom.Box2D` Box which bounds a region in pixel space. wcs : `lsst.afw.geom.SkyWcs` Wcs object defining the pixel to sky (and inverse) transform for the supplied ``bbox``. filterName : `str` Name of camera filter. epoch : `astropy.time.Time` or `None`, optional Epoch to which to correct proper motion and parallax, or `None` to not apply such corrections. bboxToSpherePadding : `int`, optional Padding to account for translating a set of corners into a spherical (convex) boundary that is certain to encompase the enitre area covered by the box. Returns ------- output : `lsst.pipe.base.Struct` Results struct with attributes: ``refCat`` Catalog containing reference objects inside the specified bounding box (padded by self.config.pixelMargin). ``fluxField`` Name of the field containing the flux associated with ``filterName``. Raises ------ RuntimeError Raised if no reference catalogs could be found for the specified region. TypeError Raised if the loaded reference catalogs do not have matching schemas.
Definition at line 514 of file loadReferenceObjects.py.
lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.loadRegion | ( | self, | |
region, | |||
filterName, | |||
filtFunc = None, | |||
epoch = None ) |
Load reference objects within a specified region. This function loads the DataIds used to construct an instance of this class which intersect or are contained within the specified region. The reference catalogs which intersect but are not fully contained within the input region are further filtered by the specified filter function. This function returns a single source catalog containing all reference objects inside the specified region. Parameters ---------- region : `lsst.sphgeom.Region` This can be any type that is derived from `lsst.sphgeom.Region` and should define the spatial region for which reference objects are to be loaded. filtFunc : callable or `None`, optional This optional parameter should be a callable object that takes a reference catalog and its corresponding region as parameters, filters the catalog by some criteria and returns the filtered reference catalog. If `None`, an internal filter function is used which filters according to if a reference object falls within the input region. filterName : `str` Name of camera filter. epoch : `astropy.time.Time` or `None`, optional Epoch to which to correct proper motion and parallax, or `None` to not apply such corrections. Returns ------- output : `lsst.pipe.base.Struct` Results struct with attributes: ``refCat`` Catalog containing reference objects which intersect the input region, filtered by the specified filter function. ``fluxField`` Name of the field containing the flux associated with ``filterName``. Raises ------ RuntimeError Raised if no reference catalogs could be found for the specified region. TypeError Raised if the loaded reference catalogs do not have matching schemas.
Definition at line 605 of file loadReferenceObjects.py.
lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.loadSkyCircle | ( | self, | |
ctrCoord, | |||
radius, | |||
filterName, | |||
epoch = None ) |
Load reference objects that lie within a circular region on the sky. This method constructs a circular region from an input center and angular radius, loads reference catalogs which are contained in or intersect the circle, and filters reference catalogs which intersect down to objects which lie within the defined circle. Parameters ---------- ctrCoord : `lsst.geom.SpherePoint` Point defining the center of the circular region. radius : `lsst.geom.Angle` Defines the angular radius of the circular region. filterName : `str` Name of camera filter. epoch : `astropy.time.Time` or `None`, optional Epoch to which to correct proper motion and parallax, or `None` to not apply such corrections. Returns ------- output : `lsst.pipe.base.Struct` Results struct with attributes: ``refCat`` Catalog containing reference objects inside the specified search circle. ``fluxField`` Name of the field containing the flux associated with ``filterName``.
Definition at line 720 of file loadReferenceObjects.py.
lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.config |
Definition at line 189 of file loadReferenceObjects.py.
|
static |
Definition at line 184 of file loadReferenceObjects.py.
lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.dataIds |
Definition at line 190 of file loadReferenceObjects.py.
lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.log |
Definition at line 193 of file loadReferenceObjects.py.
lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.name |
Definition at line 192 of file loadReferenceObjects.py.
lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.refCats |
Definition at line 191 of file loadReferenceObjects.py.