LSST Applications g1653933729+34a971ddd9,g1a997c3884+34a971ddd9,g28da252d5a+e9c12036e6,g2bbee38e9b+387d105147,g2bc492864f+387d105147,g2ca4be77d2+2af33ed832,g2cdde0e794+704103fe75,g3156d2b45e+6e87dc994a,g347aa1857d+387d105147,g35bb328faa+34a971ddd9,g3a166c0a6a+387d105147,g3bc1096a96+da0d0eec6b,g3e281a1b8c+8ec26ec694,g4005a62e65+ba0306790b,g414038480c+9f5be647b3,g41af890bb2+260fbe2614,g5065538af8+ba676e4b71,g5a0bb5165c+019e928339,g717e5f8c0f+90540262f6,g80478fca09+bbe9b7c29a,g8204df1d8d+90540262f6,g82479be7b0+c8d705dbd9,g858d7b2824+90540262f6,g9125e01d80+34a971ddd9,g91f4dbe722+fd1343598d,ga5288a1d22+cbf2f5b209,gae0086650b+34a971ddd9,gb58c049af0+ace264a4f2,gc28159a63d+387d105147,gcf0d15dbbd+c403bb023e,gd6b7c0dfd1+f7139e6704,gda6a2b7d83+c403bb023e,gdaeeff99f8+7774323b41,ge2409df99d+d3bbf40f76,ge33fd446bb+90540262f6,ge79ae78c31+387d105147,gf0baf85859+890af219f9,gf5289d68f6+d7e5a322af,w.2024.37
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Attributes | List of all members
lsst.pipe.tasks.peekExposure.PeekTask Class Reference
Inheritance diagram for lsst.pipe.tasks.peekExposure.PeekTask:

Public Member Functions

 __init__ (self, Any|None schema=None, **Any kwargs)
 
pipeBase.Struct run (self, afwImage.Exposure exposure, int|None binSize=None)
 

Public Attributes

 schema
 
 algMetadata
 

Static Public Attributes

 ConfigClass = PeekTaskConfig
 
PeekTaskConfig config
 
InstallGaussianPsfTask installPsf
 
SubtractBackgroundTask background
 
SourceDetectionTask detection
 
SingleFrameMeasurementTask measurement
 

Static Protected Attributes

str _DefaultName = "peek"
 

Detailed Description

Peek at exposure to quickly detect and measure both the brightest source
in the image, and a set of sources representative of the exposure's overall
image quality.

Optionally bins image and then:
    - installs a simple PSF model
    - measures and subtracts the background
    - detects sources
    - measures sources

Designed to be quick at the expense of primarily completeness, but also to
a lesser extent accuracy.

Definition at line 308 of file peekExposure.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.pipe.tasks.peekExposure.PeekTask.__init__ ( self,
Any | None schema = None,
**Any kwargs )

Definition at line 331 of file peekExposure.py.

331 def __init__(self, schema: Any | None = None, **kwargs: Any):
332 super().__init__(**kwargs)
333
334 if schema is None:
335 schema = SourceTable.makeMinimalSchema()
336 self.schema = schema
337
338 self.makeSubtask("installPsf")
339 self.makeSubtask("background")
340 self.makeSubtask("detection", schema=self.schema)
341 self.algMetadata = dafBase.PropertyList()
342 self.makeSubtask("measurement", schema=self.schema, algMetadata=self.algMetadata)
343
Class for storing ordered metadata with comments.

Member Function Documentation

◆ run()

pipeBase.Struct lsst.pipe.tasks.peekExposure.PeekTask.run ( self,
afwImage.Exposure exposure,
int | None binSize = None )
Peek at exposure.

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure at which to peek.
binSize : `int`, optional
    Binning factor for exposure.  Default is None, which will use the
    default binning factor from the config.

Returns
-------
result : `pipeBase.Struct`
    Result of peeking.
    Struct containing:
        - sourceCat : `lsst.afw.table.SourceCatalog`
            Source catalog from the binned exposure.

Definition at line 344 of file peekExposure.py.

344 def run(self, exposure: afwImage.Exposure, binSize: int | None = None) -> pipeBase.Struct:
345 """Peek at exposure.
346
347 Parameters
348 ----------
349 exposure : `lsst.afw.image.Exposure`
350 Exposure at which to peek.
351 binSize : `int`, optional
352 Binning factor for exposure. Default is None, which will use the
353 default binning factor from the config.
354
355 Returns
356 -------
357 result : `pipeBase.Struct`
358 Result of peeking.
359 Struct containing:
360 - sourceCat : `lsst.afw.table.SourceCatalog`
361 Source catalog from the binned exposure.
362 """
363 if binSize is None:
364 binSize = self.config.defaultBinSize
365
366 if binSize != 1:
367 mi = exposure.getMaskedImage()
368 binned = afwMath.binImage(mi, binSize)
369 exposure.setMaskedImage(binned)
370
371 if self.config.doInstallPsf:
372 self.installPsf.run(exposure=exposure)
373
374 self.background.run(exposure)
375
376 idGenerator = IdGenerator()
377 sourceIdFactory = idGenerator.make_table_id_factory()
378 table = SourceTable.make(self.schema, sourceIdFactory)
379 table.setMetadata(self.algMetadata)
380 sourceCat = self.detection.run(table=table, exposure=exposure, doSmooth=True).sources
381
382 self.measurement.run(measCat=sourceCat, exposure=exposure, exposureId=idGenerator.catalog_id)
383
384 return pipeBase.Struct(
385 sourceCat=sourceCat,
386 )
387
388
std::shared_ptr< ImageT > binImage(ImageT const &inImage, int const binX, int const binY, lsst::afw::math::Property const flags=lsst::afw::math::MEAN)
Definition binImage.cc:44

Member Data Documentation

◆ _DefaultName

str lsst.pipe.tasks.peekExposure.PeekTask._DefaultName = "peek"
staticprotected

Definition at line 329 of file peekExposure.py.

◆ algMetadata

lsst.pipe.tasks.peekExposure.PeekTask.algMetadata

Definition at line 341 of file peekExposure.py.

◆ background

SubtractBackgroundTask lsst.pipe.tasks.peekExposure.PeekTask.background
static

Definition at line 326 of file peekExposure.py.

◆ config

PeekTaskConfig lsst.pipe.tasks.peekExposure.PeekTask.config
static

Definition at line 324 of file peekExposure.py.

◆ ConfigClass

lsst.pipe.tasks.peekExposure.PeekTask.ConfigClass = PeekTaskConfig
static

Definition at line 323 of file peekExposure.py.

◆ detection

SourceDetectionTask lsst.pipe.tasks.peekExposure.PeekTask.detection
static

Definition at line 327 of file peekExposure.py.

◆ installPsf

InstallGaussianPsfTask lsst.pipe.tasks.peekExposure.PeekTask.installPsf
static

Definition at line 325 of file peekExposure.py.

◆ measurement

SingleFrameMeasurementTask lsst.pipe.tasks.peekExposure.PeekTask.measurement
static

Definition at line 328 of file peekExposure.py.

◆ schema

lsst.pipe.tasks.peekExposure.PeekTask.schema

Definition at line 336 of file peekExposure.py.


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