lsst.meas.algorithms  20.0.0-10-g0891cd99+46481c538d
Public Member Functions | List of all members
lsst.meas.algorithms.brightStarStamps.BrightStarStamps Class Reference
Inheritance diagram for lsst.meas.algorithms.brightStarStamps.BrightStarStamps:

Public Member Functions

def __init__ (self, starStamps, innerRadius=None, outerRadius=None, metadata=None)
 
def __len__ (self)
 
def __getitem__ (self, index)
 
def __iter__ (self)
 
def append (self, item, innerRadius, outerRadius)
 
def extend (self, bss)
 
def getMaskedImages (self)
 
def getMagnitudes (self)
 
def getGaiaIds (self)
 
def getAnnularFluxes (self)
 
def selectByMag (self, magMin=None, magMax=None)
 
def metadata (self)
 
def writeFits (self, filename)
 
def readFits (cls, filename)
 
def readFitsWithOptions (cls, filename, options)
 

Detailed Description

Collection of bright star stamps and associated metadata.

Parameters
----------
starStamps : `collections.abc.Sequence` [`BrightStarStamp`]
    Sequence of star stamps.
innerRadius : `int`, optional
    Inner radius value, in pixels. This and ``outerRadius`` define the
    annulus used to compute the ``"annularFlux"`` values within each
    ``starStamp``. Must be provided if ``"INNER_RADIUS"`` and
    ``"OUTER_RADIUS"`` are not present in ``metadata``.
outerRadius : `int`, optional
    Outer radius value, in pixels. This and ``innerRadius`` define the
    annulus used to compute the ``"annularFlux"`` values within each
    ``starStamp``. Must be provided if ``"INNER_RADIUS"`` and
    ``"OUTER_RADIUS"`` are not present in ``metadata``.
metadata : `lsst.daf.base.PropertyList`, optional
    Metadata associated with the bright stars.

Raises
------
ValueError
    Raised if one of the star stamps provided does not contain the
    required keys.
AttributeError
    Raised if the definition of the annulus used to compute each star's
    normalization factor are not provided, that is, if ``"INNER_RADIUS"``
    and ``"OUTER_RADIUS"`` are not present in ``metadata`` _and_
    ``innerRadius`` and ``outerRadius`` are not provided.

Notes
-----
A (gen2) butler can be used to read only a part of the stamps,
specified by a bbox:

>>> starSubregions = butler.get("brightStarStamps_sub", dataId, bbox=bbox)

Definition at line 55 of file brightStarStamps.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.__init__ (   self,
  starStamps,
  innerRadius = None,
  outerRadius = None,
  metadata = None 
)

Definition at line 94 of file brightStarStamps.py.

Member Function Documentation

◆ __getitem__()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.__getitem__ (   self,
  index 
)

Definition at line 110 of file brightStarStamps.py.

◆ __iter__()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.__iter__ (   self)

Definition at line 113 of file brightStarStamps.py.

◆ __len__()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.__len__ (   self)

Definition at line 107 of file brightStarStamps.py.

◆ append()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.append (   self,
  item,
  innerRadius,
  outerRadius 
)
Add an additional bright star stamp.

Parameters
----------
item : `BrightStarStamp`
    Bright star stamp to append.
innerRadius : `int`
    Inner radius value, in4 pixels. This and ``outerRadius`` define the
    annulus used to compute the ``"annularFlux"`` values within each
    ``starStamp``.
outerRadius : `int`, optional
    Outer radius value, in pixels. This and ``innerRadius`` define the
    annulus used to compute the ``"annularFlux"`` values within each
    ``starStamp``.

Definition at line 116 of file brightStarStamps.py.

◆ extend()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.extend (   self,
  bss 
)
Extend BrightStarStamps instance by appending elements from another
instance.

Parameters
----------
bss : `BrightStarStamps`
    Other instance to concatenate.

Definition at line 139 of file brightStarStamps.py.

◆ getAnnularFluxes()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.getAnnularFluxes (   self)
Retrieve normalization factors for each star.

These are computed by integrating the flux in annulus centered on the
bright star, far enough from center to be beyond most severe ghosts and
saturation. The inner and outer radii that define the annulus can be
recovered from the metadata.

Returns
-------
annularFluxes : list[`float`]

Definition at line 180 of file brightStarStamps.py.

◆ getGaiaIds()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.getGaiaIds (   self)
Retrieve Gaia IDs for each star.

Returns
-------
gaiaIds : `list` [`int`]

Definition at line 171 of file brightStarStamps.py.

◆ getMagnitudes()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.getMagnitudes (   self)
Retrieve Gaia G magnitudes for each star.

Returns
-------
gaiaGMags : `list` [`float`]

Definition at line 162 of file brightStarStamps.py.

◆ getMaskedImages()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.getMaskedImages (   self)
Retrieve star images.

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

Definition at line 152 of file brightStarStamps.py.

◆ metadata()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.metadata (   self)

Definition at line 215 of file brightStarStamps.py.

◆ readFits()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.readFits (   cls,
  filename 
)
Read bright star stamps from FITS file.

Returns
-------
bss : `BrightStarStamps`
    Collection of bright star stamps.

Definition at line 263 of file brightStarStamps.py.

◆ readFitsWithOptions()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.readFitsWithOptions (   cls,
  filename,
  options 
)
Read bright star stamps from FITS file, allowing for only a
subregion of the stamps to be read.

Returns
-------
bss : `BrightStarStamps`
    Collection of bright star stamps.

Definition at line 275 of file brightStarStamps.py.

◆ selectByMag()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.selectByMag (   self,
  magMin = None,
  magMax = None 
)
Return the subset of bright star stamps for objects with specified
magnitude cuts (in Gaia G).

Parameters
----------
magMin : `float`, optional
    Keep only stars fainter than this value.
magMax : `float`, optional
    Keep only stars brighter than this value.

Definition at line 194 of file brightStarStamps.py.

◆ writeFits()

def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.writeFits (   self,
  filename 
)
Write a single FITS file containing all bright star stamps.

Definition at line 238 of file brightStarStamps.py.


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