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 | Static Public Attributes | List of all members
lsst.pipe.tasks.selectImages.BaseSelectImagesTask Class Reference
Inheritance diagram for lsst.pipe.tasks.selectImages.BaseSelectImagesTask:
lsst.pipe.drivers.utils.NullSelectImagesTask lsst.pipe.tasks.selectImages.WcsSelectImagesTask

Public Member Functions

def run (self, coordList)
 
def runDataRef (self, dataRef, coordList, makeDataRefList=True, selectDataList=[])
 

Static Public Attributes

 ConfigClass = pexConfig.Config
 

Detailed Description

Base task for selecting images suitable for coaddition

Definition at line 74 of file selectImages.py.

Member Function Documentation

◆ run()

def lsst.pipe.tasks.selectImages.BaseSelectImagesTask.run (   self,
  coordList 
)
Select images suitable for coaddition in a particular region

@param[in] coordList: list of coordinates defining region of interest; if None then select all images
subclasses may add additional keyword arguments, as required

@return a pipeBase Struct containing:
- exposureInfoList: a list of exposure information objects (subclasses of BaseExposureInfo),
    which have at least the following fields:
    - dataId: data ID dictionary
    - coordList: ICRS coordinates of the corners of the exposure (list of lsst.geom.SpherePoint)

Definition at line 81 of file selectImages.py.

81  def run(self, coordList):
82  """Select images suitable for coaddition in a particular region
83 
84  @param[in] coordList: list of coordinates defining region of interest; if None then select all images
85  subclasses may add additional keyword arguments, as required
86 
87  @return a pipeBase Struct containing:
88  - exposureInfoList: a list of exposure information objects (subclasses of BaseExposureInfo),
89  which have at least the following fields:
90  - dataId: data ID dictionary
91  - coordList: ICRS coordinates of the corners of the exposure (list of lsst.geom.SpherePoint)
92  """
93  raise NotImplementedError()
94 
def run(self, coaddExposures, bbox, wcs)
Definition: getTemplate.py:603

◆ runDataRef()

def lsst.pipe.tasks.selectImages.BaseSelectImagesTask.runDataRef (   self,
  dataRef,
  coordList,
  makeDataRefList = True,
  selectDataList = [] 
)
Run based on a data reference

This delegates to run() and _runArgDictFromDataId() to do the actual
selection. In the event that the selectDataList is non-empty, this will
be used to further restrict the selection, providing the user with
additional control over the selection.

@param[in] dataRef: data reference; must contain any extra keys needed by the subclass
@param[in] coordList: list of coordinates defining region of interest; if None, search the whole sky
@param[in] makeDataRefList: if True, return dataRefList
@param[in] selectDataList: List of SelectStruct with dataRefs to consider for selection
@return a pipeBase Struct containing:
- exposureInfoList: a list of objects derived from ExposureInfo
- dataRefList: a list of data references (None if makeDataRefList False)

Reimplemented in lsst.pipe.drivers.utils.NullSelectImagesTask, and lsst.pipe.tasks.selectImages.WcsSelectImagesTask.

Definition at line 102 of file selectImages.py.

102  def runDataRef(self, dataRef, coordList, makeDataRefList=True, selectDataList=[]):
103  """Run based on a data reference
104 
105  This delegates to run() and _runArgDictFromDataId() to do the actual
106  selection. In the event that the selectDataList is non-empty, this will
107  be used to further restrict the selection, providing the user with
108  additional control over the selection.
109 
110  @param[in] dataRef: data reference; must contain any extra keys needed by the subclass
111  @param[in] coordList: list of coordinates defining region of interest; if None, search the whole sky
112  @param[in] makeDataRefList: if True, return dataRefList
113  @param[in] selectDataList: List of SelectStruct with dataRefs to consider for selection
114  @return a pipeBase Struct containing:
115  - exposureInfoList: a list of objects derived from ExposureInfo
116  - dataRefList: a list of data references (None if makeDataRefList False)
117  """
118  runArgDict = self._runArgDictFromDataId(dataRef.dataId)
119  exposureInfoList = self.run(coordList, **runArgDict).exposureInfoList
120 
121  if len(selectDataList) > 0 and len(exposureInfoList) > 0:
122  # Restrict the exposure selection further
123  ccdKeys, ccdValues = _extractKeyValue(exposureInfoList)
124  inKeys, inValues = _extractKeyValue([s.dataRef for s in selectDataList], keys=ccdKeys)
125  inValues = set(inValues)
126  newExposureInfoList = []
127  for info, ccdVal in zip(exposureInfoList, ccdValues):
128  if ccdVal in inValues:
129  newExposureInfoList.append(info)
130  else:
131  self.log.info("De-selecting exposure %s: not in selectDataList", info.dataId)
132  exposureInfoList = newExposureInfoList
133 
134  if makeDataRefList:
135  butler = dataRef.butlerSubset.butler
136  dataRefList = [butler.dataRef(datasetType="calexp",
137  dataId=expInfo.dataId,
138  ) for expInfo in exposureInfoList]
139  else:
140  dataRefList = None
141 
142  return pipeBase.Struct(
143  dataRefList=dataRefList,
144  exposureInfoList=exposureInfoList,
145  )
146 
147 
daf::base::PropertySet * set
Definition: fits.cc:912

Member Data Documentation

◆ ConfigClass

lsst.pipe.tasks.selectImages.BaseSelectImagesTask.ConfigClass = pexConfig.Config
static

Definition at line 77 of file selectImages.py.


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