lsst.meas.algorithms#

The lsst.meas.algorithms module provides a variety of astronomical measurement algorithms.

LSST Reference Catalogs#

Task reference#

Tasks#

Pipeline tasks#

Script reference#

Contributing#

lsst.meas.algorithms is developed at lsst/meas_algorithms. You can find Jira issues for this module under the meas_algorithms component.

Python API reference#

lsst.meas.algorithms Package#

Functions#

addExposures(exposureList)

Add a set of exposures together.

backgroundFlatContext(maskedImage, doApply)

Context manager to convert from photometric-flattened to background- flattened image.

countPsfCandidates(psfCells[, nStarPerCell])

createKernelFromPsfCandidates(psfCells, ...)

findCosmicRays(image, psf, bkgd, policy[, keep])

fitKernelParamsToImage(kernel, image, pos)

fitKernelToImage(kernel, image, pos)

fitSpatialKernelFromPsfCandidates(*args, ...)

Overloaded function.

generateSkyObjects(mask, seed, config)

Generate a list of Footprints of sky objects

getRefFluxField(schema, filterName)

Get the name of a flux field from a schema.

getRefFluxKeys(schema, filterName)

Return keys for flux and flux error.

interpolateOverDefects(image, psf, badList)

legacyInterpolateOverDefects(image, psf, badList)

makeCoaddApCorrMap(catalog, coaddBox, coaddWcs)

Construct an ApCorrMap for a coadd

makeCoaddTransmissionCurve(coaddWcs, ...)

makePsfCandidate(source, image)

readFitsWithOptions(filename, stamp_factory, ...)

Read stamps from FITS file, allowing for only a subregion of the stamps to be read.

remove_signal_from_variance(exposure[, ...])

Removes the Poisson contribution from actual sources in the variance plane of an Exposure.

subtractPsf(psf, data, x, y[, psfFlux])

writeFits(filename, stamps, metadata, ...[, ...])

Write a single FITS file containing all stamps.

Classes#

AccumulatorMeanStack(shape, bit_mask_value)

Stack masked images.

AmpCurve(amp_name_list, wavelength, ...)

Subclass of Curve that represents a curve per amp.

BasePsfDeterminerConfig(*args, **kw)

Configuration that is likely to be shared by all PSF determiners

BasePsfDeterminerTask(config[, schema])

Base class for PSF determiners

BaseSourceSelectorConfig(*args, **kw)

BaseSourceSelectorTask(**kwargs)

Base class for source selectors

BaseStarSelectorConfig(*args, **kw)

BaseStarSelectorTask(schema, **kwds)

Base class for star selectors

BrightStarStamp(stamp_im, psf, wcs, visit, ...)

A single postage stamp centered on a bright star.

BrightStarStamps(brightStarStamps[, metadata])

A collection of bright star stamps.

CentroidErrorLimit(*args, **kw)

Select sources using a limit on the centroid errors.

CloughTocher2DInterpolatorUtils

CoaddBoundedField

CoaddBoundedFieldElement

CoaddPsf

CoaddPsfConfig(*args, **kw)

CoaddPsfControl

ColorLimit(*args, **kw)

Select sources using a color limit

ComputeNoiseCorrelationConfig(*args, **kw)

ComputeNoiseCorrelationTask(*args, **kwargs)

Compute the noise correlation coefficients in a MaskedImage

ConvertGaiaManager(*args, **kwargs)

Special-case convert manager to deal with Gaia fluxes.

ConvertGaiaXpManager(filenames, config, ...)

Special-case convert manager for Gaia XP spectrophotometry catalogs, that have fluxes/flux errors, instead of magnitudes/mag errors.

ConvertRefcatManager(filenames, config, ...)

Convert a reference catalog from external files into the LSST HTM sharded format, using a multiprocessing Pool to speed up the work.

ConvertReferenceCatalogConfig(*args, **kw)

ConvertReferenceCatalogTask(*[, output_dir])

Class for producing HTM-indexed reference catalogs from external catalog data.

CorrelationMatrix(array)

A class holding correlation coefficients for a set of background pixels.

CullFromMaskedRegion(*args, **kw)

Deselect sources that lie in a "bad" mask plane.

Curve(wavelength, efficiency, metadata)

An abstract class to represent an arbitrary curve with interpolation.

DatasetConfig(*args, **kw)

Description of the on-disk storage format for the converted reference catalog.

Defect

DetectorCurve(wavelength, efficiency, metadata)

Subclass of Curve that represents a single curve per detector.

DoubleGaussianPsf

DynamicDetectionConfig(*args, **kw)

Configuration for DynamicDetectionTask

DynamicDetectionTask(*args, **kwargs)

Detection of sources on an image with a dynamic threshold

ExceedsMaxVarianceScaleError(*args, **kwargs)

Raised if ScaleVariance exceeds a specified threshold.

FindCosmicRaysConfig(*args, **kw)

Config for the findCosmicRays function

FindGlintTrailsConfig(*args, **kw)

FindGlintTrailsTask([config, name, ...])

Find glint trails in a catalog by searching for sources that lie in a line.

FlaggedSourceSelectorConfig(*args, **kw)

FlaggedSourceSelectorTask(**kwargs)

A trivial SourceSelector that simply uses an existing flag field to filter a SourceCatalog.

GaussianProcessTreegp([std, ...])

Gaussian Process Treegp class for Gaussian Process interpolation.

GaussianPsfFactory(*args, **kw)

Factory for simple Gaussian PSF models

GlintTrailParameters(*, slope, intercept, ...)

Holds values from the line fit to a single glint trail.

ImageCurve(wavelength, efficiency, metadata)

ImagePsf

InsufficientSourcesError(*args, **kwargs)

Raised if an insufficient number of sky sources are found for dynamic detection.

InterpolateOverDefectGaussianProcess(...[, ...])

InterpolateOverDefectGaussianProcess class performs Gaussian Process (GP) interpolation over defects in an image.

KernelPsf

LoadReferenceObjectsConfig(*args, **kw)

MagnitudeErrorLimit(*args, **kw)

Select sources using a magnitude error limit

MagnitudeLimit(*args, **kw)

Select sources using a magnitude limit

MakePsfCandidatesConfig(*args, **kw)

MakePsfCandidatesTask([config, name, ...])

Create PSF candidates given an input catalog.

MaskStreaksConfig(*args, **kw)

Configuration parameters for MaskStreaksTask.

MaskStreaksTask([config, name, parentTask, log])

Find streaks or other straight lines in image data.

MeasureApCorrConfig(*args, **kw)

Configuration for MeasureApCorrTask.

MeasureApCorrError(*args, **kwargs)

Raised if Aperture Correction fails in a non-recoverable way.

MeasureApCorrTask(schema[, namesToCorrect])

Task to measure aperture correction.

NormalizedCalibrationFluxConfig(*args, **kw)

Configuration parameters for NormalizedCalibrationFluxTask.

NormalizedCalibrationFluxError(*args, **kwargs)

Raised if Aperture Correction fails in a non-recoverable way.

NormalizedCalibrationFluxTask(schema, **kwargs)

Task to measure the normalized calibration flux.

NullSourceSelectorTask(**kwargs)

Source selector that returns true for all sources.

ObjectSizeNoGoodSourcesError(*args, **kwargs)

Raised if no good sources were available after applying configured selection criteria.

ObjectSizeNoSourcesError(*args, **kwargs)

Raised if no sources were supplied in the input catalog.

ObjectSizeStarSelectorConfig(*args, **kw)

ObjectSizeStarSelectorTask(**kwargs)

A star selector that looks for a cluster of small objects in a size-magnitude plot, typically to select stars for PSF estimation.

PcaPsf

PcaPsfDeterminerConfig(*args, **kw)

PcaPsfDeterminerTask(config[, schema])

A measurePsfTask psf estimator.

PsfCandidateF

PsfGenerationError(*args, **kwargs)

Raised when we cannot generate a PSF for detection

ReadFitsCatalogConfig(*args, **kw)

ReadFitsCatalogTask([config, name, ...])

Read an object catalog from a FITS table

ReadTextCatalogConfig(*args, **kw)

ReadTextCatalogTask([config, name, ...])

Read an object catalog from a text file

ReferenceObjectLoader(dataIds, refCats[, ...])

This class facilitates loading reference catalogs.

ReferenceSourceSelectorConfig(*args, **kw)

ReferenceSourceSelectorTask(**kwargs)

Reference source selector

ReinterpolatePixelsConfig(*args, **kw)

Config for ReinterpolatePixelsTask

ReinterpolatePixelsTask([config, name, ...])

Task to reinterpolate pixels

RequireFiniteRaDec(*args, **kw)

Select sources that have finite RA and Dec sky coordinate values

RequireFlags(*args, **kw)

Select sources using flags

RequirePrimary(*args, **kw)

Select sources that have the detect_isPrimary flag set.

RequireUnresolved(*args, **kw)

Select sources using star/galaxy separation

ReserveSourcesConfig(*args, **kw)

Configuration for reserving sources

ReserveSourcesTask([columnName, schema, doc])

Reserve sources from analysis

ScaleVarianceConfig(*args, **kw)

ScaleVarianceTask(*args, **kwargs)

Scale the variance in a MaskedImage

ScienceSourceSelectorConfig(*args, **kw)

Configuration for selecting science sources

ScienceSourceSelectorTask(**kwargs)

Science source selector

SetPrimaryFlagsConfig(*args, **kw)

SetPrimaryFlagsTask(*, schema[, isSingleFrame])

Set the isPrimary flag and either various blendedness, or patch/tract flags to a catalog (for single frame or coadd catalogs, respectively), based on other properties of the sources.

SignalToNoiseLimit(*args, **kw)

Select sources using a flux signal-to-noise limit

SingleGaussianPsf

SkyObjectsConfig(*args, **kw)

Configuration for generating sky objects

SkyObjectsTask([schema])

Generate a list of Footprints of sky sources/objects (regions on the sky that do not otherwise have detections).

SourceDetectionConfig(*args, **kw)

Configuration parameters for the SourceDetectionTask

SourceDetectionTask([schema])

Detect peaks and footprints of sources in an image.

Stamp(stamp_im, archive_element, position, ...)

Single stamp.

Stamps(stamps[, metadata, use_mask, ...])

StampsBase(stamps[, metadata, use_mask, ...])

Collection of stamps and associated metadata.

SubtractBackgroundConfig(*args, **kw)

Config for SubtractBackgroundTask

SubtractBackgroundTask([config, name, ...])

Subtract the background from an exposure

TooManyMaskedPixelsError(*args, **kwargs)

Raised when all pixels in the image are masked and no background can be estimated.

WarpedPsf

ZeroFootprintError(*args, **kwargs)

Raised if no footprints are detected in the image.