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.PsfWcsSelectImagesTask Class Reference
Inheritance diagram for lsst.pipe.tasks.selectImages.PsfWcsSelectImagesTask:
lsst.pipe.tasks.selectImages.WcsSelectImagesTask lsst.pipe.tasks.selectImages.BaseSelectImagesTask

Public Member Functions

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

Static Public Attributes

 ConfigClass = PsfWcsSelectImagesConfig
 

Detailed Description

Select images using their Wcs and cuts on the PSF properties

Definition at line 262 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.PsfWcsSelectImagesTask.runDataRef (   self,
  dataRef,
  coordList,
  makeDataRefList = True,
  selectDataList = [] 
)
Select images in the selectDataList that overlap the patch and satisfy PSF quality critera.

The PSF quality criteria are based on the size and ellipticity residuals from the
adaptive second moments of the star and the PSF.

The criteria are:
  - the median of the ellipticty residuals
  - the robust scatter of the size residuals (using the median absolute deviation)
  - the robust scatter of the size residuals scaled by the square of
    the median size

@param dataRef: Data reference for coadd/tempExp (with tract, patch)
@param coordList: List of ICRS coordinates (lsst.geom.SpherePoint) specifying boundary of patch
@param makeDataRefList: Construct a list of data references?
@param selectDataList: List of SelectStruct, to consider for selection

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

Definition at line 268 of file selectImages.py.

268  def runDataRef(self, dataRef, coordList, makeDataRefList=True, selectDataList=[]):
269  """Select images in the selectDataList that overlap the patch and satisfy PSF quality critera.
270 
271  The PSF quality criteria are based on the size and ellipticity residuals from the
272  adaptive second moments of the star and the PSF.
273 
274  The criteria are:
275  - the median of the ellipticty residuals
276  - the robust scatter of the size residuals (using the median absolute deviation)
277  - the robust scatter of the size residuals scaled by the square of
278  the median size
279 
280  @param dataRef: Data reference for coadd/tempExp (with tract, patch)
281  @param coordList: List of ICRS coordinates (lsst.geom.SpherePoint) specifying boundary of patch
282  @param makeDataRefList: Construct a list of data references?
283  @param selectDataList: List of SelectStruct, to consider for selection
284  """
285  result = super(PsfWcsSelectImagesTask, self).runDataRef(dataRef, coordList, makeDataRefList,
286  selectDataList)
287 
288  dataRefList = []
289  exposureInfoList = []
290  for dataRef, exposureInfo in zip(result.dataRefList, result.exposureInfoList):
291  butler = dataRef.butlerSubset.butler
292  srcCatalog = butler.get('src', dataRef.dataId)
293  mask = srcCatalog[self.config.starSelection]
294 
295  starXX = srcCatalog[self.config.starShape+'_xx'][mask]
296  starYY = srcCatalog[self.config.starShape+'_yy'][mask]
297  starXY = srcCatalog[self.config.starShape+'_xy'][mask]
298  psfXX = srcCatalog[self.config.psfShape+'_xx'][mask]
299  psfYY = srcCatalog[self.config.psfShape+'_yy'][mask]
300  psfXY = srcCatalog[self.config.psfShape+'_xy'][mask]
301 
302  starSize = np.power(starXX*starYY - starXY**2, 0.25)
303  starE1 = (starXX - starYY)/(starXX + starYY)
304  starE2 = 2*starXY/(starXX + starYY)
305  medianSize = np.median(starSize)
306 
307  psfSize = np.power(psfXX*psfYY - psfXY**2, 0.25)
308  psfE1 = (psfXX - psfYY)/(psfXX + psfYY)
309  psfE2 = 2*psfXY/(psfXX + psfYY)
310 
311  medianE1 = np.abs(np.median(starE1 - psfE1))
312  medianE2 = np.abs(np.median(starE2 - psfE2))
313  medianE = np.sqrt(medianE1**2 + medianE2**2)
314 
315  scatterSize = sigmaMad(starSize - psfSize)
316  scaledScatterSize = scatterSize/medianSize**2
317 
318  valid = True
319  if self.config.maxEllipResidual and medianE > self.config.maxEllipResidual:
320  self.log.info("Removing visit %s because median e residual too large: %f vs %f" %
321  (dataRef.dataId, medianE, self.config.maxEllipResidual))
322  valid = False
323  elif self.config.maxSizeScatter and scatterSize > self.config.maxSizeScatter:
324  self.log.info("Removing visit %s because size scatter is too large: %f vs %f" %
325  (dataRef.dataId, scatterSize, self.config.maxSizeScatter))
326  valid = False
327  elif self.config.maxScaledSizeScatter and scaledScatterSize > self.config.maxScaledSizeScatter:
328  self.log.info("Removing visit %s because scaled size scatter is too large: %f vs %f" %
329  (dataRef.dataId, scaledScatterSize, self.config.maxScaledSizeScatter))
330  valid = False
331 
332  if valid is False:
333  continue
334 
335  dataRefList.append(dataRef)
336  exposureInfoList.append(exposureInfo)
337 
338  return pipeBase.Struct(
339  dataRefList=dataRefList,
340  exposureInfoList=exposureInfoList,
341  )
342 
343 

Member Data Documentation

◆ ConfigClass

lsst.pipe.tasks.selectImages.PsfWcsSelectImagesTask.ConfigClass = PsfWcsSelectImagesConfig
static

Definition at line 265 of file selectImages.py.


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