lsst.meas.algorithms ga883e5f241+b78ff77604
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
lsst.meas.algorithms.stamps.StampsBase Class Reference
Inheritance diagram for lsst.meas.algorithms.stamps.StampsBase:
lsst.meas.algorithms.stamps.Stamps lsst.meas.algorithms.brightStarStamps.BrightStarStamps

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_variance
 
 use_archive
 

Protected Member Functions

 _refresh_metadata (self)
 

Protected Attributes

 _stamps
 
 _metadata
 

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 311 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 
)

Reimplemented in lsst.meas.algorithms.brightStarStamps.BrightStarStamps.

Definition at line 342 of file stamps.py.

Member Function Documentation

◆ __getitem__()

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

Definition at line 426 of file stamps.py.

◆ __iter__()

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

Definition at line 429 of file stamps.py.

◆ __len__()

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

Definition at line 423 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.brightStarStamps.BrightStarStamps, and lsst.meas.algorithms.stamps.Stamps.

Definition at line 399 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 442 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 432 of file stamps.py.

◆ metadata()

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

Definition at line 453 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.brightStarStamps.BrightStarStamps, and lsst.meas.algorithms.stamps.Stamps.

Definition at line 353 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.brightStarStamps.BrightStarStamps, and lsst.meas.algorithms.stamps.Stamps.

Definition at line 365 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 403 of file stamps.py.

Member Data Documentation

◆ _metadata

lsst.meas.algorithms.stamps.StampsBase._metadata
protected

Definition at line 347 of file stamps.py.

◆ _stamps

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

Definition at line 346 of file stamps.py.

◆ use_archive

lsst.meas.algorithms.stamps.StampsBase.use_archive

Definition at line 350 of file stamps.py.

◆ use_mask

lsst.meas.algorithms.stamps.StampsBase.use_mask

Definition at line 348 of file stamps.py.

◆ use_variance

lsst.meas.algorithms.stamps.StampsBase.use_variance

Definition at line 349 of file stamps.py.


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