ReferenceObjectLoaderBase

class lsst.meas.algorithms.ReferenceObjectLoaderBase(*args, **kwargs)

Bases: ReferenceObjectLoader

Stub of a deprecated class.

Parameters:
configlsst.pex.config.Config

Configuration for the loader.

.. deprecated:: v25.0

Base class only used for gen2 interface, and will be removed after v25.0. Please use ReferenceObjectLoader directly.

Methods Summary

applyProperMotions(catalog, epoch)

Apply proper motion correction to a reference catalog.

getMetadataBox(bbox, wcs, filterName[, ...])

Return metadata about the loaded reference catalog, in an on-detector box.

getMetadataCircle(coord, radius, filterName)

Return metadata about the loaded reference catalog, in an on-sky circle.

loadPixelBox(bbox, wcs, filterName[, epoch, ...])

Load reference objects that are within a pixel-based rectangular region.

loadRegion(region, filterName[, filtFunc, epoch])

Load reference objects within a specified region.

loadSkyCircle(ctrCoord, radius, filterName)

Load reference objects that lie within a circular region on the sky.

makeMinimalSchema(filterNameList, *[, ...])

Make a standard schema for reference object catalogs.

Methods Documentation

applyProperMotions(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:
cataloglsst.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_raProper motion in Right Ascension (rad/yr,

    East positive)

  • pm_raErr : Error in pm_ra (rad/yr), optional.

  • pm_decProper 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)

epochastropy.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.

getMetadataBox(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:
bboxlsst.geom.Box2I or lsst.geom.Box2D

Bounding box for the pixels.

wcslsst.afw.geom.SkyWcs

The WCS object associated with bbox.

filterNamestr

Name of the camera filter.

epochastropy.time.Time or None, optional

Epoch that proper motion and parallax were corrected to, or None if no such corrections were applied.

bboxToSpherePaddingint, 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:
mdlsst.daf.base.PropertyList

The metadata detailing the search parameters used for this dataset.

static getMetadataCircle(coord, radius, filterName, epoch=None)

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:
coordlsst.geom.SpherePoint

ICRS center of the search region.

radiuslsst.geom.Angle

Radius of the search region.

filterNamestr

Name of the camera filter.

epochastropy.time.Time or None, optional

Epoch that proper motion and parallax were corrected to, or None if no such corrections were applied.

Returns:
mdlsst.daf.base.PropertyList

Metadata about the catalog.

loadPixelBox(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:
bboxlsst.geom.Box2I or lsst.geom.Box2D

Box which bounds a region in pixel space.

wcslsst.afw.geom.SkyWcs

Wcs object defining the pixel to sky (and inverse) transform for the supplied bbox.

filterNamestr

Name of camera filter.

epochastropy.time.Time or None, optional

Epoch to which to correct proper motion and parallax, or None to not apply such corrections.

bboxToSpherePaddingint, 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:
outputlsst.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.

loadRegion(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:
regionlsst.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.

filtFunccallable 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.

filterNamestr

Name of camera filter.

epochastropy.time.Time or None, optional

Epoch to which to correct proper motion and parallax, or None to not apply such corrections.

Returns:
outputlsst.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.

loadSkyCircle(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:
ctrCoordlsst.geom.SpherePoint

Point defining the center of the circular region.

radiuslsst.geom.Angle

Defines the angular radius of the circular region.

filterNamestr

Name of camera filter.

epochastropy.time.Time or None, optional

Epoch to which to correct proper motion and parallax, or None to not apply such corrections.

Returns:
outputlsst.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.

static makeMinimalSchema(filterNameList, *, addCentroid=False, addIsPhotometric=False, addIsResolved=False, addIsVariable=False, coordErrDim=2, addProperMotion=False, properMotionErrDim=2, addParallax=False)

Make a standard schema for reference object catalogs.

Parameters:
filterNameListlist of str

List of filter names. Used to create <filterName>_flux fields.

addIsPhotometricbool

If True then add field “photometric”.

addIsResolvedbool

If True then add field “resolved”.

addIsVariablebool

If True then add field “variable”.

coordErrDimint

Number of coord error fields; must be one of 0, 2, 3:

  • If 2 or 3: add fields “coord_raErr” and “coord_decErr”.

  • If 3: also add field “coord_radecErr”.

addProperMotionbool

If True add fields “epoch”, “pm_ra”, “pm_dec” and “pm_flag”.

properMotionErrDimint

Number of proper motion error fields; must be one of 0, 2, 3; ignored if addProperMotion false: - If 2 or 3: add fields “pm_raErr” and “pm_decErr”. - If 3: also add field “pm_radecErr”.

addParallaxbool

If True add fields “epoch”, “parallax”, “parallaxErr” and “parallax_flag”.

Returns:
schemalsst.afw.table.Schema

Schema for reference catalog, an lsst.afw.table.SimpleCatalog.

Notes

Reference catalogs support additional covariances, such as covariance between RA and proper motion in declination, that are not supported by this method, but can be added after calling this method.