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 | |
def | __init__ (self, starStamps, innerRadius=None, outerRadius=None, nb90Rots=None, metadata=None, use_mask=True, use_variance=False, use_archive=False) |
def | initAndNormalize (cls, starStamps, innerRadius, outerRadius, nb90Rots=None, metadata=None, use_mask=True, use_variance=False, use_archive=False, imCenter=None, discardNanFluxObjects=True, statsControl=afwMath.StatisticsControl(), statsFlag=afwMath.stringToStatisticsProperty("MEAN"), badMaskPlanes=('BAD', 'SAT', 'NO_DATA')) |
def | readFits (cls, filename) |
def | readFitsWithOptions (cls, filename, options) |
def | append (self, item, innerRadius=None, outerRadius=None) |
def | extend (self, bss) |
def | getMagnitudes (self) |
def | getGaiaIds (self) |
def | getAnnularFluxes (self) |
def | selectByMag (self, magMin=None, magMax=None) |
def | getPositions (self) |
def | append (self, item) |
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 | |
normalized | |
nb90Rots | |
use_mask | |
use_variance | |
use_archive | |
Collection of bright star stamps and associated metadata. Parameters ---------- starStamps : `collections.abc.Sequence` [`BrightStarStamp`] Sequence of star stamps. Cannot contain both normalized and unnormalized 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 ``normalize`` is True. 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 ``normalize`` is True. nb90Rots : `int`, optional Number of 90 degree rotations required to compensate for detector orientation. metadata : `lsst.daf.base.PropertyList`, optional Metadata associated with the bright stars. use_mask : `bool` If `True` read and write mask data. Default `True`. use_variance : `bool` If ``True`` read and write variance data. Default ``False``. use_archive : `bool` If ``True`` read and write an Archive that contains a Persistable associated with each stamp. In the case of bright stars, this is usually a ``TransformPoint2ToPoint2``, used to warp each stamp to the same pixel grid before stacking. Raises ------ ValueError Raised if one of the star stamps provided does not contain the required keys. AttributeError Raised if there is a mix-and-match of normalized and unnormalized stamps, stamps normalized with different annulus definitions, or if stamps are to be normalized but annular radii were not provided. 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 151 of file brightStarStamps.py.
def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.__init__ | ( | self, | |
starStamps, | |||
innerRadius = None , |
|||
outerRadius = None , |
|||
nb90Rots = None , |
|||
metadata = None , |
|||
use_mask = True , |
|||
use_variance = False , |
|||
use_archive = False |
|||
) |
Definition at line 201 of file brightStarStamps.py.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Add an additional stamp. Parameters ---------- item : `Stamp` Stamp object to append.
Definition at line 419 of file stamps.py.
def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.append | ( | self, | |
item, | |||
innerRadius = None , |
|||
outerRadius = None |
|||
) |
Add an additional bright star stamp. Parameters ---------- item : `BrightStarStamp` Bright star stamp to append. innerRadius : `int`, optional Inner radius value, in pixels. This and ``outerRadius`` define the annulus used to compute the ``"annularFlux"`` values within each ``BrightStarStamp``. outerRadius : `int`, optional Outer radius value, in pixels. This and ``innerRadius`` define the annulus used to compute the ``"annularFlux"`` values within each ``BrightStarStamp``.
Definition at line 364 of file brightStarStamps.py.
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.
Reimplemented from lsst.meas.algorithms.stamps.Stamps.
Definition at line 390 of file brightStarStamps.py.
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 423 of file brightStarStamps.py.
|
inherited |
Retrieve archive elements associated with each stamp. Returns ------- archiveElements : `list` [`lsst.afwTable.io.Persistable`]
def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.getGaiaIds | ( | self | ) |
Retrieve Gaia IDs for each star. Returns ------- gaiaIds : `list` [`int`]
Definition at line 414 of file brightStarStamps.py.
def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.getMagnitudes | ( | self | ) |
Retrieve Gaia G magnitudes for each star. Returns ------- gaiaGMags : `list` [`float`]
Definition at line 405 of file brightStarStamps.py.
|
inherited |
Retrieve star images. Returns ------- maskedImages : `list` [`lsst.afw.image.maskedImage.maskedImage.MaskedImageF`]
|
inherited |
def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.initAndNormalize | ( | cls, | |
starStamps, | |||
innerRadius, | |||
outerRadius, | |||
nb90Rots = None , |
|||
metadata = None , |
|||
use_mask = True , |
|||
use_variance = False , |
|||
use_archive = False , |
|||
imCenter = None , |
|||
discardNanFluxObjects = True , |
|||
statsControl = afwMath.StatisticsControl() , |
|||
statsFlag = afwMath.stringToStatisticsProperty("MEAN") , |
|||
badMaskPlanes = ('BAD', 'SAT', 'NO_DATA') |
|||
) |
Normalize a set of bright star stamps and initialize a BrightStarStamps instance. Since the center of bright stars are saturated and/or heavily affected by ghosts, we measure their flux in an annulus with a large enough inner radius to avoid the most severe ghosts and contain enough non-saturated pixels. Parameters ---------- starStamps : `collections.abc.Sequence` [`BrightStarStamp`] Sequence of star stamps. Cannot contain both normalized and unnormalized stamps. innerRadius : `int` Inner radius value, in pixels. This and ``outerRadius`` define the annulus used to compute the ``"annularFlux"`` values within each ``starStamp``. outerRadius : `int` Outer radius value, in pixels. This and ``innerRadius`` define the annulus used to compute the ``"annularFlux"`` values within each ``starStamp``. nb90Rots : `int`, optional Number of 90 degree rotations required to compensate for detector orientation. metadata : `lsst.daf.base.PropertyList`, optional Metadata associated with the bright stars. use_mask : `bool` If `True` read and write mask data. Default `True`. use_variance : `bool` If ``True`` read and write variance data. Default ``False``. use_archive : `bool` If ``True`` read and write an Archive that contains a Persistable associated with each stamp. In the case of bright stars, this is usually a ``TransformPoint2ToPoint2``, used to warp each stamp to the same pixel grid before stacking. imCenter : `collections.abc.Sequence`, optional Center of the object, in pixels. If not provided, the center of the first stamp's pixel grid will be used. discardNanFluxObjects : `bool` Whether objects with NaN annular flux should be discarded. If False, these objects will not be normalized. statsControl : `lsst.afw.math.statistics.StatisticsControl`, optional StatisticsControl to be used when computing flux over all pixels within the annulus. statsFlag : `lsst.afw.math.statistics.Property`, optional statsFlag to be passed on to ``afwMath.makeStatistics`` to compute annularFlux. Defaults to a simple MEAN. badMaskPlanes : `collections.abc.Collection` [`str`] Collection of mask planes to ignore when computing annularFlux. Raises ------ ValueError Raised if one of the star stamps provided does not contain the required keys. AttributeError Raised if there is a mix-and-match of normalized and unnormalized stamps, stamps normalized with different annulus definitions, or if stamps are to be normalized but annular radii were not provided.
Definition at line 215 of file brightStarStamps.py.
|
inherited |
def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.readFits | ( | cls, | |
filename | |||
) |
Build an instance of this class from a file. Parameters ---------- filename : `str` Name of the file to read
Reimplemented from lsst.meas.algorithms.stamps.Stamps.
Definition at line 332 of file brightStarStamps.py.
def lsst.meas.algorithms.brightStarStamps.BrightStarStamps.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 from lsst.meas.algorithms.stamps.Stamps.
Definition at line 343 of file brightStarStamps.py.
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 437 of file brightStarStamps.py.
|
inherited |
Write this object to a file. Parameters ---------- filename : `str` Name of file to write
Definition at line 363 of file stamps.py.
lsst.meas.algorithms.brightStarStamps.BrightStarStamps.nb90Rots |
Definition at line 212 of file brightStarStamps.py.
lsst.meas.algorithms.brightStarStamps.BrightStarStamps.normalized |
Definition at line 209 of file brightStarStamps.py.
|
inherited |
|
inherited |