LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | List of all members
lsst.pipe.tasks.assembleCoadd.AssembleCoaddDataIdContainer Class Reference
Inheritance diagram for lsst.pipe.tasks.assembleCoadd.AssembleCoaddDataIdContainer:

Public Member Functions

def makeDataRefList
 

Detailed Description

A version of lsst.pipe.base.DataIdContainer specialized for assembleCoadd.

Definition at line 559 of file assembleCoadd.py.

Member Function Documentation

def lsst.pipe.tasks.assembleCoadd.AssembleCoaddDataIdContainer.makeDataRefList (   self,
  namespace 
)
Make self.refList from self.idList.

   Interpret the config.doMatchBackgrounds, config.autoReference,
   and whether a visit/run supplied.
   If a visit/run is supplied, config.autoReference is automatically set to False.
   if config.doMatchBackgrounds == false, then a visit/run will be ignored if accidentally supplied.

Definition at line 562 of file assembleCoadd.py.

563  def makeDataRefList(self, namespace):
564  """Make self.refList from self.idList.
565 
566  Interpret the config.doMatchBackgrounds, config.autoReference,
567  and whether a visit/run supplied.
568  If a visit/run is supplied, config.autoReference is automatically set to False.
569  if config.doMatchBackgrounds == false, then a visit/run will be ignored if accidentally supplied.
570 
571  """
572  keysCoadd = namespace.butler.getKeys(datasetType=namespace.config.coaddName + "Coadd",
573  level=self.level)
574  keysCoaddTempExp = namespace.butler.getKeys(datasetType=namespace.config.coaddName + "Coadd_tempExp",
575  level=self.level)
576 
577  if namespace.config.doMatchBackgrounds:
578  if namespace.config.autoReference: #matcher will pick it's own reference image
579  datasetType = namespace.config.coaddName + "Coadd"
580  validKeys = keysCoadd
581  else:
582  datasetType = namespace.config.coaddName + "Coadd_tempExp"
583  validKeys = keysCoaddTempExp
584  else: #bkg subtracted coadd
585  datasetType = namespace.config.coaddName + "Coadd"
586  validKeys = keysCoadd
587 
588  for dataId in self.idList:
589  # tract and patch are required
590  for key in validKeys:
591  if key not in dataId:
592  raise RuntimeError("--id must include " + key)
593 
594  for key in dataId: # check if users supplied visit/run
595  if (key not in keysCoadd) and (key in keysCoaddTempExp): #user supplied a visit/run
596  if namespace.config.autoReference:
597  # user probably meant: autoReference = False
598  namespace.config.autoReference = False
599  datasetType = namespace.config.coaddName + "Coadd_tempExp"
600  print "Switching config.autoReference to False; applies only to background Matching."
601  break
602 
603  dataRef = namespace.butler.dataRef(
604  datasetType = datasetType,
605  dataId = dataId,
606  )
607  self.refList.append(dataRef)
608 

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