StampsBase¶
- class lsst.meas.algorithms.StampsBase(stamps, metadata=None, use_mask=True, use_variance=True, use_archive=False)¶
-
Collection of stamps and associated metadata.
- Parameters:
- stampsiterable
This should be an iterable of dataclass objects a la
lsst.meas.algorithms.Stamp.- metadata
lsst.daf.base.PropertyList, optional Metadata associated with the objects within the stamps.
- use_mask
bool, optional If
Trueread and write the mask data. DefaultTrue.- use_variance
bool, optional If
Trueread and write the variance data. DefaultTrue.- use_archive
bool, optional If
True, read and write an Archive that contains a Persistable associated with each stamp, for example a Transform or a WCS. DefaultFalse.
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
Methods Summary
count(value)Retrieve archive elements associated with each stamp.
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[lsst.afwTable.io.Persistable]
- getMaskedImages()¶
Retrieve star images.
- Returns:
- maskedImages
list[lsst.afw.image.maskedImage.maskedImage.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:
- filename
str Name of the file to read
- filename