LSST Applications  21.0.0-147-g0e635eb1+1acddb5be5,22.0.0+052faf71bd,22.0.0+1ea9a8b2b2,22.0.0+6312710a6c,22.0.0+729191ecac,22.0.0+7589c3a021,22.0.0+9f079a9461,22.0.1-1-g7d6de66+b8044ec9de,22.0.1-1-g87000a6+536b1ee016,22.0.1-1-g8e32f31+6312710a6c,22.0.1-10-gd060f87+016f7cdc03,22.0.1-12-g9c3108e+df145f6f68,22.0.1-16-g314fa6d+c825727ab8,22.0.1-19-g93a5c75+d23f2fb6d8,22.0.1-19-gb93eaa13+aab3ef7709,22.0.1-2-g8ef0a89+b8044ec9de,22.0.1-2-g92698f7+9f079a9461,22.0.1-2-ga9b0f51+052faf71bd,22.0.1-2-gac51dbf+052faf71bd,22.0.1-2-gb66926d+6312710a6c,22.0.1-2-gcb770ba+09e3807989,22.0.1-20-g32debb5+b8044ec9de,22.0.1-23-gc2439a9a+fb0756638e,22.0.1-3-g496fd5d+09117f784f,22.0.1-3-g59f966b+1e6ba2c031,22.0.1-3-g849a1b8+f8b568069f,22.0.1-3-gaaec9c0+c5c846a8b1,22.0.1-32-g5ddfab5d3+60ce4897b0,22.0.1-4-g037fbe1+64e601228d,22.0.1-4-g8623105+b8044ec9de,22.0.1-5-g096abc9+d18c45d440,22.0.1-5-g15c806e+57f5c03693,22.0.1-7-gba73697+57f5c03693,master-g6e05de7fdc+c1283a92b8,master-g72cdda8301+729191ecac,w.2021.39
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 73 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 80 of file selectImages.py.

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

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

Member Data Documentation

◆ ConfigClass

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

Definition at line 76 of file selectImages.py.


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