lsst.meas.algorithms g1581cd22ba+2a89f360ba
Loading...
Searching...
No Matches
lsst.meas.algorithms.stamps.StampsBase Class Reference
Inheritance diagram for lsst.meas.algorithms.stamps.StampsBase:
lsst.meas.algorithms.stamps.Stamps

Public Member Functions

 __init__ (self, stamps, metadata=None, use_mask=True, use_variance=True, use_archive=False)
 
 readFits (cls, filename)
 
 readFitsWithOptions (cls, filename, options)
 
 writeFits (self, filename)
 
 __len__ (self)
 
 __getitem__ (self, index)
 
 __iter__ (self)
 
 getMaskedImages (self)
 
 getArchiveElements (self)
 
 metadata (self)
 

Public Attributes

 use_mask = use_mask
 
 use_variance = use_variance
 
 use_archive = use_archive
 

Protected Member Functions

 _refresh_metadata (self)
 

Protected Attributes

 _stamps = stamps
 
 _metadata = PropertyList() if metadata is None else metadata.deepCopy()
 

Detailed Description

Collection of stamps and associated metadata.

Parameters
----------
stamps : iterable
    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 ``True`` read and write the mask data. Default ``True``.
use_variance : `bool`, optional
    If ``True`` read and write the variance data. Default ``True``.
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.
    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}
    )

Definition at line 323 of file stamps.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 354 of file stamps.py.

Member Function Documentation

◆ __getitem__()

lsst.meas.algorithms.stamps.StampsBase.__getitem__ ( self,
index )

Definition at line 438 of file stamps.py.

◆ __iter__()

lsst.meas.algorithms.stamps.StampsBase.__iter__ ( self)

Definition at line 441 of file stamps.py.

◆ __len__()

lsst.meas.algorithms.stamps.StampsBase.__len__ ( self)

Definition at line 435 of file stamps.py.

◆ _refresh_metadata()

lsst.meas.algorithms.stamps.StampsBase._refresh_metadata ( self)
protected
Make sure metadata is up to date, as this object can be extended.

Reimplemented in lsst.meas.algorithms.stamps.Stamps.

Definition at line 411 of file stamps.py.

◆ getArchiveElements()

lsst.meas.algorithms.stamps.StampsBase.getArchiveElements ( self)
Retrieve archive elements associated with each stamp.

Returns
-------
archiveElements :
    `list` [`~lsst.afw.table.io.Persistable`]

Definition at line 454 of file stamps.py.

◆ getMaskedImages()

lsst.meas.algorithms.stamps.StampsBase.getMaskedImages ( self)
Retrieve star images.

Returns
-------
maskedImages :
    `list` [`~lsst.afw.image.MaskedImageF`]

Definition at line 444 of file stamps.py.

◆ metadata()

lsst.meas.algorithms.stamps.StampsBase.metadata ( self)

Definition at line 465 of file stamps.py.

◆ readFits()

lsst.meas.algorithms.stamps.StampsBase.readFits ( cls,
filename )
Build an instance of this class from a file.

Parameters
----------
filename : `str`
    Name of the file to read

Reimplemented in lsst.meas.algorithms.stamps.Stamps.

Definition at line 365 of file stamps.py.

◆ readFitsWithOptions()

lsst.meas.algorithms.stamps.StampsBase.readFitsWithOptions ( cls,
filename,
options )
Build an instance of this class with options.

Parameters
----------
filename : `str`
    Name of the file to read
options : `PropertyList`
    Collection of metadata parameters

Reimplemented in lsst.meas.algorithms.stamps.Stamps.

Definition at line 377 of file stamps.py.

◆ writeFits()

lsst.meas.algorithms.stamps.StampsBase.writeFits ( self,
filename )
Write this object to a file.

Parameters
----------
filename : `str`
    Name of file to write.

Definition at line 415 of file stamps.py.

Member Data Documentation

◆ _metadata

lsst.meas.algorithms.stamps.StampsBase._metadata = PropertyList() if metadata is None else metadata.deepCopy()
protected

Definition at line 359 of file stamps.py.

◆ _stamps

lsst.meas.algorithms.stamps.StampsBase._stamps = stamps
protected

Definition at line 358 of file stamps.py.

◆ use_archive

lsst.meas.algorithms.stamps.StampsBase.use_archive = use_archive

Definition at line 362 of file stamps.py.

◆ use_mask

lsst.meas.algorithms.stamps.StampsBase.use_mask = use_mask

Definition at line 360 of file stamps.py.

◆ use_variance

lsst.meas.algorithms.stamps.StampsBase.use_variance = use_variance

Definition at line 361 of file stamps.py.


The documentation for this class was generated from the following file: