LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Public Member Functions | Public Attributes | List of all members
lsst.meas.algorithms.stamps.Stamps Class Reference
Inheritance diagram for lsst.meas.algorithms.stamps.Stamps:
lsst.meas.algorithms.stamps.StampsBase lsst.meas.algorithms.brightStarStamps.BrightStarStamps

Public Member Functions

def getPositions (self)
 
def append (self, item)
 
def extend (self, stamp_list)
 
def readFits (cls, filename)
 
def readFitsWithOptions (cls, filename, options)
 
def writeFits (self, filename)
 
def __len__ (self)
 
def __getitem__ (self, index)
 
def __iter__ (self)
 
def getMaskedImages (self)
 
def getArchiveElements (self)
 
def metadata (self)
 

Public Attributes

 use_mask
 
 use_variance
 
 use_archive
 

Detailed Description

Definition at line 410 of file stamps.py.

Member Function Documentation

◆ __getitem__()

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

Definition at line 379 of file stamps.py.

379  def __getitem__(self, index):
380  return self._stamps[index]
381 

◆ __iter__()

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

Definition at line 382 of file stamps.py.

382  def __iter__(self):
383  return iter(self._stamps)
384 

◆ __len__()

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

Definition at line 376 of file stamps.py.

376  def __len__(self):
377  return len(self._stamps)
378 

◆ append()

def lsst.meas.algorithms.stamps.Stamps.append (   self,
  item 
)
Add an additional stamp.

Parameters
----------
item : `Stamp`
    Stamp object to append.

Definition at line 419 of file stamps.py.

419  def append(self, item):
420  """Add an additional stamp.
421 
422  Parameters
423  ----------
424  item : `Stamp`
425  Stamp object to append.
426  """
427  if not isinstance(item, Stamp):
428  raise ValueError("Objects added must be a Stamp object.")
429  self._stamps.append(item)
430  return None
431 
std::shared_ptr< FrameSet > append(FrameSet const &first, FrameSet const &second)
Construct a FrameSet that performs two transformations in series.
Definition: functional.cc:33

◆ extend()

def lsst.meas.algorithms.stamps.Stamps.extend (   self,
  stamp_list 
)
Extend Stamps instance by appending elements from another instance.

Parameters
----------
stamps_list : `list` [`Stamp`]
    List of Stamp object to append.

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

Definition at line 432 of file stamps.py.

432  def extend(self, stamp_list):
433  """Extend Stamps instance by appending elements from another instance.
434 
435  Parameters
436  ----------
437  stamps_list : `list` [`Stamp`]
438  List of Stamp object to append.
439  """
440  for s in stamp_list:
441  if not isinstance(s, Stamp):
442  raise ValueError('Can only extend with Stamp objects')
443  self._stamps += stamp_list
444 

◆ getArchiveElements()

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

Returns
-------
archiveElements :
    `list` [`lsst.afwTable.io.Persistable`]

Definition at line 395 of file stamps.py.

395  def getArchiveElements(self):
396  """Retrieve archive elements associated with each stamp.
397 
398  Returns
399  -------
400  archiveElements :
401  `list` [`lsst.afwTable.io.Persistable`]
402  """
403  return [stamp.archive_element for stamp in self._stamps]
404 

◆ getMaskedImages()

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

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

Definition at line 385 of file stamps.py.

385  def getMaskedImages(self):
386  """Retrieve star images.
387 
388  Returns
389  -------
390  maskedImages :
391  `list` [`lsst.afw.image.maskedImage.maskedImage.MaskedImageF`]
392  """
393  return [stamp.stamp_im for stamp in self._stamps]
394 

◆ getPositions()

def lsst.meas.algorithms.stamps.Stamps.getPositions (   self)

Definition at line 416 of file stamps.py.

416  def getPositions(self):
417  return [s.position for s in self._stamps]
418 

◆ metadata()

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

Definition at line 406 of file stamps.py.

406  def metadata(self):
407  return self._metadata
408 
409 

◆ readFits()

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

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

Returns
-------
object : `Stamps`
    An instance of this class

Reimplemented from lsst.meas.algorithms.stamps.StampsBase.

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

Definition at line 446 of file stamps.py.

446  def readFits(cls, filename):
447  """Build an instance of this class from a file.
448 
449  Parameters
450  ----------
451  filename : `str`
452  Name of the file to read
453 
454  Returns
455  -------
456  object : `Stamps`
457  An instance of this class
458  """
459  return cls.readFitsWithOptions(filename, None)
460 

◆ readFitsWithOptions()

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

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

Returns
-------
object : `Stamps`
    An instance of this class

Reimplemented from lsst.meas.algorithms.stamps.StampsBase.

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

Definition at line 462 of file stamps.py.

462  def readFitsWithOptions(cls, filename, options):
463  """Build an instance of this class with options.
464 
465  Parameters
466  ----------
467  filename : `str`
468  Name of the file to read
469  options : `PropertyList` or `dict`
470  Collection of metadata parameters
471 
472  Returns
473  -------
474  object : `Stamps`
475  An instance of this class
476  """
477  stamps, metadata = readFitsWithOptions(filename, Stamp.factory, options)
478  return cls(stamps, metadata=metadata, use_mask=metadata['HAS_MASK'],
479  use_variance=metadata['HAS_VARIANCE'], use_archive=metadata['HAS_ARCHIVE'])
def readFitsWithOptions(filename, stamp_factory, options)
Definition: stamps.py:101

◆ writeFits()

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

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

Definition at line 363 of file stamps.py.

363  def writeFits(self, filename):
364  """Write this object to a file.
365 
366  Parameters
367  ----------
368  filename : `str`
369  Name of file to write
370  """
371  self._refresh_metadata()
372  type_name = get_full_type_name(self)
373  writeFits(filename, self._stamps, self._metadata, type_name, self.use_mask, self.use_variance,
374  self.use_archive)
375 
def writeFits(filename, stamps, metadata, type_name, write_mask, write_variance, write_archive=False)
Definition: stamps.py:42

Member Data Documentation

◆ use_archive

lsst.meas.algorithms.stamps.StampsBase.use_archive
inherited

Definition at line 310 of file stamps.py.

◆ use_mask

lsst.meas.algorithms.stamps.StampsBase.use_mask
inherited

Definition at line 308 of file stamps.py.

◆ use_variance

lsst.meas.algorithms.stamps.StampsBase.use_variance
inherited

Definition at line 309 of file stamps.py.


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