LSST Applications g0265f82a02+c6dfa2ddaf,g1162b98a3f+b2075782a9,g2079a07aa2+1b2e822518,g2bbee38e9b+c6dfa2ddaf,g337abbeb29+c6dfa2ddaf,g3ddfee87b4+a60788ef87,g50ff169b8f+2eb0e556e8,g52b1c1532d+90ebb246c7,g555ede804d+a60788ef87,g591dd9f2cf+ba8caea58f,g5ec818987f+864ee9cddb,g858d7b2824+9ee1ab4172,g876c692160+a40945ebb7,g8a8a8dda67+90ebb246c7,g8cdfe0ae6a+4fd9e222a8,g99cad8db69+5e309b7bc6,g9ddcbc5298+a1346535a5,ga1e77700b3+df8f93165b,ga8c6da7877+aa12a14d27,gae46bcf261+c6dfa2ddaf,gb0e22166c9+8634eb87fb,gb3f2274832+d0da15e3be,gba4ed39666+1ac82b564f,gbb8dafda3b+5dfd9c994b,gbeb006f7da+97157f9740,gc28159a63d+c6dfa2ddaf,gc86a011abf+9ee1ab4172,gcf0d15dbbd+a60788ef87,gdaeeff99f8+1cafcb7cd4,gdc0c513512+9ee1ab4172,ge79ae78c31+c6dfa2ddaf,geb67518f79+ba1859f325,geb961e4c1e+f9439d1e6f,gee10cc3b42+90ebb246c7,gf1cff7945b+9ee1ab4172,w.2024.12
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.meas.algorithms.skyObjects.SkyObjectsTask Class Reference
Inheritance diagram for lsst.meas.algorithms.skyObjects.SkyObjectsTask:

Public Member Functions

 __init__ (self, schema=None, **kwargs)
 
 run (self, mask, seed, catalog=None)
 

Public Attributes

 skySourceKey
 

Static Public Attributes

 ConfigClass = SkyObjectsConfig
 

Detailed Description

Generate a list of Footprints of sky sources/objects (regions on the
sky that do not otherwise have detections).

Parameters
----------
schema : `lsst.afw.table.Schema`
    Schema used to create the output `~lsst.afw.table.SourceCatalog`,
    updated with fields that will be written by this task.

Definition at line 140 of file skyObjects.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.meas.algorithms.skyObjects.SkyObjectsTask.__init__ ( self,
schema = None,
** kwargs )

Definition at line 153 of file skyObjects.py.

153 def __init__(self, schema=None, **kwargs):
154 super().__init__(**kwargs)
155 if schema is not None:
156 self.skySourceKey = schema.addField("sky_source", type="Flag",
157 doc="Region on image with no detections.")
158 else:
159 self.skySourceKey = None
160

Member Function Documentation

◆ run()

lsst.meas.algorithms.skyObjects.SkyObjectsTask.run ( self,
mask,
seed,
catalog = None )
Generate a list of Footprints of sky sources/objects.

Sky objects don't overlap with other objects. This is determined
through the provided `mask` (in which objects are typically flagged
as `DETECTED`).

Sky objects are positioned using a quasi-random Halton sequence
number generator. This is a deterministic sequence that mimics a random
trial and error approach whilst acting to minimize clustering of points
for a given field of view. Up to `nTrialSources` points are generated,
returning the first `nSources` that do not overlap with the mask.

Parameters
----------
mask : `lsst.afw.image.Mask`
    Input mask plane, which identifies pixels to avoid for the sky
    objects.
seed : `int`
    Random number generator seed.
catalog : `lsst.afw.table.SourceCatalog`, optional
    Catalog to add detected footprints to; modified in-place if any
    sky source/object footprints are created.

Returns
-------
skyFootprints : `list` of `lsst.afw.detection.Footprint`
    Footprints of sky objects. Each will have a peak at the center
    of the sky object.

Definition at line 161 of file skyObjects.py.

161 def run(self, mask, seed, catalog=None):
162 """Generate a list of Footprints of sky sources/objects.
163
164 Sky objects don't overlap with other objects. This is determined
165 through the provided `mask` (in which objects are typically flagged
166 as `DETECTED`).
167
168 Sky objects are positioned using a quasi-random Halton sequence
169 number generator. This is a deterministic sequence that mimics a random
170 trial and error approach whilst acting to minimize clustering of points
171 for a given field of view. Up to `nTrialSources` points are generated,
172 returning the first `nSources` that do not overlap with the mask.
173
174 Parameters
175 ----------
176 mask : `lsst.afw.image.Mask`
177 Input mask plane, which identifies pixels to avoid for the sky
178 objects.
179 seed : `int`
180 Random number generator seed.
181 catalog : `lsst.afw.table.SourceCatalog`, optional
182 Catalog to add detected footprints to; modified in-place if any
183 sky source/object footprints are created.
184
185 Returns
186 -------
187 skyFootprints : `list` of `lsst.afw.detection.Footprint`
188 Footprints of sky objects. Each will have a peak at the center
189 of the sky object.
190 """
191 skyFootprints = generateSkyObjects(mask, seed, self.config)
192 self.log.info("Added %d of %d requested sky sources (%.0f%%)", len(skyFootprints),
193 self.config.nSources, 100*len(skyFootprints)/self.config.nSources)
194
195 if skyFootprints and self.skySourceKey is not None and catalog is not None:
196 for footprint in skyFootprints:
197 record = catalog.addNew()
198 record.setFootprint(footprint)
199 record.set(self.skySourceKey, True)
200
201 return skyFootprints

Member Data Documentation

◆ ConfigClass

lsst.meas.algorithms.skyObjects.SkyObjectsTask.ConfigClass = SkyObjectsConfig
static

Definition at line 151 of file skyObjects.py.

◆ skySourceKey

lsst.meas.algorithms.skyObjects.SkyObjectsTask.skySourceKey

Definition at line 156 of file skyObjects.py.


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