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.PeekSpecTask Class Reference
Inheritance diagram for lsst.pipe.tasks.peekExposure.PeekSpecTask:

Public Member Functions

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

Static Public Attributes

 ConfigClass = PeekSpecTaskConfig
 
PeekSpecTaskConfig config
 
PeekTask peek
 

Static Protected Attributes

str _DefaultName = "peekSpec"
 

Detailed Description

Peek at a spectroscopic exposure.

For spec mode, we dramatically increase the detection threshold to avoid
creating blends with the long spectra objects that appear in these images.
We also change the default aperture flux slot to a larger aperture, which
helps overcome challenges with lost flux in the interpolated cores of
saturated objects.

Definition at line 638 of file peekExposure.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 653 of file peekExposure.py.

653 def __init__(self, config: Any, **kwargs: Any):
654 super().__init__(config=config, **kwargs)
655 self.makeSubtask("peek")
656

Member Function Documentation

◆ getGoodSources()

np.ndarray lsst.pipe.tasks.peekExposure.PeekSpecTask.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 691 of file peekExposure.py.

691 def getGoodSources(self, binnedSourceCat: afwTable.SourceCatalog) -> np.ndarray:
692 """Perform any filtering on the source catalog.
693
694 Parameters
695 ----------
696 binnedSourceCat : `lsst.afw.table.SourceCatalog`
697 Source catalog from the binned exposure.
698
699 Returns
700 -------
701 goodSourceMask : `numpy.ndarray`
702 Boolean array indicating which sources are good.
703 """
704 # Perform any filtering on the source catalog
705 goodSourceMask = np.ones(len(binnedSourceCat), dtype=bool)
706 fpShapes = [src.getFootprint().getShape() for src in binnedSourceCat]
707 # Filter out likely spectrum detections
708 goodSourceMask &= np.array(
709 [sh.getIyy() < self.config.maxFootprintAspectRatio * sh.getIxx() for sh in fpShapes],
710 dtype=np.bool_,
711 )
712 return goodSourceMask
713
714

◆ run()

pipeBase.Struct lsst.pipe.tasks.peekExposure.PeekSpecTask.run ( self,
afwImage.Exposure exposure,
int | None binSize = None )
Peek at spectroscopic 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
    binning factor from the config.

Returns
-------
result : `pipeBase.Struct`
    Result of spec 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 657 of file peekExposure.py.

657 def run(self, exposure: afwImage.Exposure, binSize: int | None = None) -> pipeBase.Struct:
658 """Peek at spectroscopic exposure.
659
660 Parameters
661 ----------
662 exposure : `lsst.afw.image.Exposure`
663 Exposure at which to peek.
664 binSize : `int`, optional
665 Binning factor for exposure. Default is None, which will use the
666 binning factor from the config.
667
668 Returns
669 -------
670 result : `pipeBase.Struct`
671 Result of spec peeking.
672 Struct containing:
673 - mode : `str`
674 Peek mode that was run.
675 - binSize : `int`
676 Binning factor used.
677 - binnedSourceCat : `lsst.afw.table.SourceCatalog`
678 Source catalog from the binned exposure.
679 """
680 if binSize is None:
681 binSize = self.config.binSize
682
683 peekResult = self.peek.run(exposure, binSize)
684
685 return pipeBase.Struct(
686 mode="spec",
687 binSize=binSize,
688 binnedSourceCat=peekResult.sourceCat,
689 )
690

Member Data Documentation

◆ _DefaultName

str lsst.pipe.tasks.peekExposure.PeekSpecTask._DefaultName = "peekSpec"
staticprotected

Definition at line 651 of file peekExposure.py.

◆ config

PeekSpecTaskConfig lsst.pipe.tasks.peekExposure.PeekSpecTask.config
static

Definition at line 649 of file peekExposure.py.

◆ ConfigClass

lsst.pipe.tasks.peekExposure.PeekSpecTask.ConfigClass = PeekSpecTaskConfig
static

Definition at line 648 of file peekExposure.py.

◆ peek

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

Definition at line 650 of file peekExposure.py.


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