StampsBase

class lsst.meas.algorithms.StampsBase(stamps, metadata=None, use_mask=True, use_variance=True, use_archive=False)

Bases: ABC, Sequence

Collection of stamps and associated metadata.

Parameters:
stampsiterable

This should be an iterable of dataclass objects a la ~lsst.meas.algorithms.Stamp.

metadataPropertyList, optional

Metadata associated with the objects within the stamps.

use_maskbool, optional

If True read and write the mask data. Default True.

use_variancebool, optional

If True read and write the variance data. Default True.

use_archivebool, optional

If True, read and write an Archive that contains a Persistable associated with each stamp, for example a Transform or a WCS. Default False.

Notes

A butler can be used to read only a part of the stamps, specified by a bbox:

>>> starSubregions = butler.get(
        "brightStarStamps",
        dataId,
        parameters={"bbox": bbox}
    )

Attributes Summary

metadata

Methods Summary

count(value)

getArchiveElements()

Retrieve archive elements associated with each stamp.

getMaskedImages()

Retrieve star images.

index(value, [start, [stop]])

Raises ValueError if the value is not present.

readFits(filename)

Build an instance of this class from a file.

readFitsWithOptions(filename, options)

Build an instance of this class with options.

writeFits(filename)

Write this object to a file.

Attributes Documentation

metadata

Methods Documentation

count(value) integer -- return number of occurrences of value
getArchiveElements()

Retrieve archive elements associated with each stamp.

Returns:
archiveElements

list [Persistable]

getMaskedImages()

Retrieve star images.

Returns:
maskedImages

list [MaskedImageF]

index(value[, start[, stop]]) integer -- return first index of value.

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

classmethod readFits(filename)

Build an instance of this class from a file.

Parameters:
filenamestr

Name of the file to read

classmethod readFitsWithOptions(filename, options)

Build an instance of this class with options.

Parameters:
filenamestr

Name of the file to read

optionsPropertyList

Collection of metadata parameters

writeFits(filename)

Write this object to a file.

Parameters:
filenamestr

Name of file to write.