LSST Applications  21.0.0+3c14b91618,21.0.0+9f51b1e3f7,21.0.0-1-ga51b5d4+6691386486,21.0.0-10-g2408eff+093cbc5a4d,21.0.0-10-g560fb7b+b5197f4bfa,21.0.0-10-gcf60f90+88fef039d6,21.0.0-15-g490e301a+1aca7ce27a,21.0.0-2-g103fe59+a65a629d54,21.0.0-2-g1367e85+7f080822af,21.0.0-2-g45278ab+9f51b1e3f7,21.0.0-2-g5242d73+7f080822af,21.0.0-2-g7f82c8f+20b0e168c7,21.0.0-2-g8f08a60+e6fd6d9ff9,21.0.0-2-ga326454+20b0e168c7,21.0.0-2-gde069b7+66c51b65da,21.0.0-2-gecfae73+1385e31ff3,21.0.0-2-gfc62afb+7f080822af,21.0.0-20-g09baf175d+b753e4a737,21.0.0-3-g357aad2+34cf5c551a,21.0.0-3-g4be5c26+7f080822af,21.0.0-3-g65f322c+013fced60c,21.0.0-3-g7d9da8d+3c14b91618,21.0.0-3-gaa929c8+b5197f4bfa,21.0.0-3-ge02ed75+1caa01c806,21.0.0-4-g3af6bfd+3791265f16,21.0.0-4-g591bb35+1caa01c806,21.0.0-4-g88306b8+fb98652b4f,21.0.0-4-gccdca77+86bf7a300d,21.0.0-4-ge8a399c+b26ce82291,21.0.0-43-g9a3faf29+c9d24e8573,21.0.0-5-g073e055+09d740ccc5,21.0.0-6-g2d4f3f3+9f51b1e3f7,21.0.0-6-g4e60332+1caa01c806,21.0.0-6-g8356267+caf0b8986d,21.0.0-7-g6531d7b+5c053f0a73,21.0.0-7-g98eecf7+3609eddee2,21.0.0-8-ga5967ee+609c2f0a1c,master-gac4afde19b+1caa01c806,w.2021.09
LSST Data Management Base Package
Public Member Functions | Static Public Attributes | List of all members
lsst.pipe.tasks.selectImages.BestSeeingWcsSelectImagesTask Class Reference
Inheritance diagram for lsst.pipe.tasks.selectImages.BestSeeingWcsSelectImagesTask:
lsst.pipe.tasks.selectImages.WcsSelectImagesTask lsst.pipe.tasks.selectImages.BaseSelectImagesTask

Public Member Functions

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

Static Public Attributes

 ConfigClass = BestSeeingWcsSelectImageConfig
 

Detailed Description

Select up to a maximum number of the best-seeing images using their Wcs.

Definition at line 363 of file selectImages.py.

Member Function Documentation

◆ run()

def lsst.pipe.tasks.selectImages.BaseSelectImagesTask.run (   self,
  coordList 
)
inherited
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 76 of file selectImages.py.

76  def run(self, coordList):
77  """Select images suitable for coaddition in a particular region
78 
79  @param[in] coordList: list of coordinates defining region of interest; if None then select all images
80  subclasses may add additional keyword arguments, as required
81 
82  @return a pipeBase Struct containing:
83  - exposureInfoList: a list of exposure information objects (subclasses of BaseExposureInfo),
84  which have at least the following fields:
85  - dataId: data ID dictionary
86  - coordList: ICRS coordinates of the corners of the exposure (list of lsst.geom.SpherePoint)
87  """
88  raise NotImplementedError()
89 
def run(self, skyInfo, tempExpRefList, imageScalerList, weightList, altMaskList=None, mask=None, supplementaryData=None)

◆ runDataRef()

def lsst.pipe.tasks.selectImages.BestSeeingWcsSelectImagesTask.runDataRef (   self,
  dataRef,
  coordList,
  makeDataRefList = True,
  selectDataList = None 
)
Select the best-seeing images in the selectDataList that overlap the patch.

Parameters
----------
dataRef : `lsst.daf.persistence.ButlerDataRef`
    Data reference for coadd/tempExp (with tract, patch)
coordList : `list` of `lsst.geom.SpherePoint`
    List of ICRS sky coordinates specifying boundary of patch
makeDataRefList : `boolean`, optional
    Construct a list of data references?
selectDataList : `list` of `SelectStruct`
    List of SelectStruct, to consider for selection

Returns
-------
result : `lsst.pipe.base.Struct`
    Result struct with components:
    - ``exposureList``: the selected exposures
        (`list` of `lsst.pipe.tasks.selectImages.BaseExposureInfo`).
    - ``dataRefList``: the optional data references corresponding to
        each element of ``exposureList``
        (`list` of `lsst.daf.persistence.ButlerDataRef`, or `None`).

Reimplemented from lsst.pipe.tasks.selectImages.WcsSelectImagesTask.

Definition at line 368 of file selectImages.py.

369  selectDataList=None):
370  """Select the best-seeing images in the selectDataList that overlap the patch.
371 
372  Parameters
373  ----------
374  dataRef : `lsst.daf.persistence.ButlerDataRef`
375  Data reference for coadd/tempExp (with tract, patch)
376  coordList : `list` of `lsst.geom.SpherePoint`
377  List of ICRS sky coordinates specifying boundary of patch
378  makeDataRefList : `boolean`, optional
379  Construct a list of data references?
380  selectDataList : `list` of `SelectStruct`
381  List of SelectStruct, to consider for selection
382 
383  Returns
384  -------
385  result : `lsst.pipe.base.Struct`
386  Result struct with components:
387  - ``exposureList``: the selected exposures
388  (`list` of `lsst.pipe.tasks.selectImages.BaseExposureInfo`).
389  - ``dataRefList``: the optional data references corresponding to
390  each element of ``exposureList``
391  (`list` of `lsst.daf.persistence.ButlerDataRef`, or `None`).
392  """
393  if self.config.nImagesMax <= 0:
394  raise RuntimeError(f"nImagesMax must be greater than zero: {self.config.nImagesMax}")
395 
396  psfSizes = []
397  dataRefList = []
398  exposureInfoList = []
399 
400  if selectDataList is None:
401  selectDataList = []
402 
403  result = super().runDataRef(dataRef, coordList, makeDataRefList=True, selectDataList=selectDataList)
404 
405  for dataRef, exposureInfo in zip(result.dataRefList, result.exposureInfoList):
406  cal = dataRef.get("calexp", immediate=True)
407 
408  # if min/max PSF values are defined, remove images out of bounds
409  pixToArcseconds = cal.getWcs().getPixelScale().asArcseconds()
410  psfSize = cal.getPsf().computeShape().getDeterminantRadius()*pixToArcseconds
411  sizeFwhm = psfSize * np.sqrt(8.*np.log(2.))
412  if self.config.maxPsfFwhm and sizeFwhm > self.config.maxPsfFwhm:
413  continue
414  if self.config.minPsfFwhm and sizeFwhm < self.config.minPsfFwhm:
415  continue
416  psfSizes.append(psfSize)
417  dataRefList.append(dataRef)
418  exposureInfoList.append(exposureInfo)
419 
420  if len(psfSizes) > self.config.nImagesMax:
421  sortedIndices = np.argsort(psfSizes)[:self.config.nImagesMax]
422  filteredDataRefList = [dataRefList[i] for i in sortedIndices]
423  filteredExposureInfoList = [exposureInfoList[i] for i in sortedIndices]
424  self.log.info(f"{len(sortedIndices)} images selected with FWHM "
425  f"range of {psfSizes[sortedIndices[0]]}--{psfSizes[sortedIndices[-1]]} arcseconds")
426 
427  else:
428  if len(psfSizes) == 0:
429  self.log.warn("0 images selected.")
430  else:
431  self.log.debug(f"{len(psfSizes)} images selected with FWHM range "
432  f"of {psfSizes[0]}--{psfSizes[-1]} arcseconds")
433  filteredDataRefList = dataRefList
434  filteredExposureInfoList = exposureInfoList
435 
436  return pipeBase.Struct(
437  dataRefList=filteredDataRefList if makeDataRefList else None,
438  exposureInfoList=filteredExposureInfoList,
439  )

Member Data Documentation

◆ ConfigClass

lsst.pipe.tasks.selectImages.BestSeeingWcsSelectImagesTask.ConfigClass = BestSeeingWcsSelectImageConfig
static

Definition at line 366 of file selectImages.py.


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