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 | Static Public Attributes | Static Protected Attributes | List of all members
lsst.pipe.tasks.peekExposure.PeekDonutTask Class Reference
Inheritance diagram for lsst.pipe.tasks.peekExposure.PeekDonutTask:

Public Member Functions

 __init__ (self, Any config, **Any kwargs)
 
pipeBase.Struct run (self, afwImage.Exposure exposure, float donutDiameter, int|None binSize=None)
 
np.ndarray getGoodSources (self, afwTable.SourceCatalog binnedSourceCat)
 

Static Public Attributes

 ConfigClass = PeekDonutTaskConfig
 
PeekDonutTaskConfig config
 
PeekTask peek
 

Static Protected Attributes

str _DefaultName = "peekDonut"
 

Detailed Description

Peek at a donut exposure.

The main modification for donuts is to aggressively bin the image to reduce
the size of sources (donuts) from ~100 pixels or more to ~10 pixels.  This
greatly increases the speed and detection capabilities of PeekTask with
little loss of accuracy for centroids.

Definition at line 416 of file peekExposure.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.pipe.tasks.peekExposure.PeekDonutTask.__init__ ( self,
Any config,
**Any kwargs )

Definition at line 430 of file peekExposure.py.

430 def __init__(self, config: Any, **kwargs: Any):
431 super().__init__(config=config, **kwargs)
432 self.makeSubtask("peek")
433

Member Function Documentation

◆ getGoodSources()

np.ndarray lsst.pipe.tasks.peekExposure.PeekDonutTask.getGoodSources ( self,
afwTable.SourceCatalog binnedSourceCat )
Perform any filtering on the source catalog.

Parameters
----------
binnedSourceCat : `lsst.afw.table.SourceCatalog`
    Source catalog from the binned exposure.

Returns
-------
goodSourceMask : `numpy.ndarray`
    Boolean array indicating which sources are good.

Definition at line 500 of file peekExposure.py.

500 def getGoodSources(self, binnedSourceCat: afwTable.SourceCatalog) -> np.ndarray:
501 """Perform any filtering on the source catalog.
502
503 Parameters
504 ----------
505 binnedSourceCat : `lsst.afw.table.SourceCatalog`
506 Source catalog from the binned exposure.
507
508 Returns
509 -------
510 goodSourceMask : `numpy.ndarray`
511 Boolean array indicating which sources are good.
512 """
513 # Perform any filtering on the source catalog
514 goodSourceMask = np.ones(len(binnedSourceCat), dtype=bool)
515 return goodSourceMask
516
517

◆ run()

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

Parameters
----------
exposure : `lsst.afw.image.Exposure`
    Exposure at which to peek.
donutDiameter : `float`
    Donut diameter in pixels.
binSize : `int`, optional
    Binning factor for exposure.  Default is None, which will use the
    resolution config value to determine the binSize.

Returns
-------
result : `pipeBase.Struct`
    Result of donut peeking.
    Struct containing:
        - mode : `str`
            Peek mode that was run.
        - binSize : `int`
            Binning factor used.
        - binnedSourceCat : `lsst.afw.table.SourceCatalog`
            Source catalog from the binned exposure.

Definition at line 434 of file peekExposure.py.

436 ) -> pipeBase.Struct:
437 """Peek at donut exposure.
438
439 Parameters
440 ----------
441 exposure : `lsst.afw.image.Exposure`
442 Exposure at which to peek.
443 donutDiameter : `float`
444 Donut diameter in pixels.
445 binSize : `int`, optional
446 Binning factor for exposure. Default is None, which will use the
447 resolution config value to determine the binSize.
448
449 Returns
450 -------
451 result : `pipeBase.Struct`
452 Result of donut peeking.
453 Struct containing:
454 - mode : `str`
455 Peek mode that was run.
456 - binSize : `int`
457 Binning factor used.
458 - binnedSourceCat : `lsst.afw.table.SourceCatalog`
459 Source catalog from the binned exposure.
460 """
461 if binSize is None:
462 binSize = int(
463 np.floor(
464 np.clip(
465 donutDiameter / self.config.resolution,
466 1,
467 self.config.binSizeMax,
468 )
469 )
470 )
471 binnedDonutDiameter = donutDiameter / binSize
472 psf = DonutPsf(
473 binnedDonutDiameter * 1.5, binnedDonutDiameter * 0.5, binnedDonutDiameter * 0.5 * 0.3525
474 )
475
476 # Note that SourceDetectionTask will convolve with a _Gaussian
477 # approximation to the PSF_ anyway, so we don't really need to be
478 # precise with the PSF unless this changes. PSFs that approach the
479 # size of the image, however, can cause problems with the detection
480 # convolution algorithm, so we limit the size.
481 sigma = psf.computeShape(psf.getAveragePosition()).getDeterminantRadius()
482 factor = 8 * sigma / (min(exposure.getDimensions()) / binSize)
483
484 if factor > 1:
485 psf = DonutPsf(
486 binnedDonutDiameter * 1.5 / factor,
487 binnedDonutDiameter * 0.5 / factor,
488 binnedDonutDiameter * 0.5 * 0.3525 / factor,
489 )
490 exposure.setPsf(psf)
491
492 peekResult = self.peek.run(exposure, binSize)
493
494 return pipeBase.Struct(
495 mode="donut",
496 binSize=binSize,
497 binnedSourceCat=peekResult.sourceCat,
498 )
499
int min

Member Data Documentation

◆ _DefaultName

str lsst.pipe.tasks.peekExposure.PeekDonutTask._DefaultName = "peekDonut"
staticprotected

Definition at line 428 of file peekExposure.py.

◆ config

PeekDonutTaskConfig lsst.pipe.tasks.peekExposure.PeekDonutTask.config
static

Definition at line 426 of file peekExposure.py.

◆ ConfigClass

lsst.pipe.tasks.peekExposure.PeekDonutTask.ConfigClass = PeekDonutTaskConfig
static

Definition at line 425 of file peekExposure.py.

◆ peek

PeekTask lsst.pipe.tasks.peekExposure.PeekDonutTask.peek
static

Definition at line 427 of file peekExposure.py.


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