|
lsst.meas.algorithms g4ca71c8708+5e2e56f82e
|
Public Member Functions | |
| def | __init__ (self, dataIds, refCats, log=None, config=None, **kwargs) |
| def | loadPixelBox (self, bbox, wcs, filterName, epoch=None, bboxToSpherePadding=100) |
| def | loadRegion (self, region, filterName, filtFunc=None, epoch=None) |
| def | loadSkyCircle (self, ctrCoord, radius, filterName, epoch=None) |
Public Attributes | |
| dataIds | |
| refCats | |
| log | |
This class facilitates loading reference catalogs with gen 3 middleware.
The QuantumGraph generation will create a list of datasets that may
possibly overlap a given region. These datasets are then used to construct
and 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
in a gen 3 repository.
refCats : iterable of `lsst.daf.butler.DeferredDatasetHandle`
Handles to load refCats on demand
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 747 of file loadReferenceObjects.py.
| def lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.__init__ | ( | self, | |
| dataIds, | |||
| refCats, | |||
log = None, |
|||
config = None, |
|||
| ** | kwargs | ||
| ) |
Reimplemented from lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoaderBase.
Definition at line 768 of file loadReferenceObjects.py.
| def 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 776 of file loadReferenceObjects.py.
| def 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 867 of file loadReferenceObjects.py.
| def 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 987 of file loadReferenceObjects.py.
| lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.dataIds |
Definition at line 772 of file loadReferenceObjects.py.
| lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.log |
Definition at line 774 of file loadReferenceObjects.py.
| lsst.meas.algorithms.loadReferenceObjects.ReferenceObjectLoader.refCats |
Definition at line 773 of file loadReferenceObjects.py.