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 | Public Attributes | List of all members
lsst.pipe.tasks.coaddInputRecorder.CoaddTempExpInputRecorder Class Reference
Inheritance diagram for lsst.pipe.tasks.coaddInputRecorder.CoaddTempExpInputRecorder:

Public Member Functions

def __init__
 
def addCalExp
 
def finish
 

Public Attributes

 task
 
 coaddInputs
 
 visitRecord
 

Detailed Description

A helper class for CoaddInputRecorderTask, managing the CoaddInputs object for that a single
CoaddTempExp.  This will contain single 'visit' record for the CoaddTempExp and a number of 'ccd'
records.

Should generally be created by calling CoaddInputRecorderTask.makeCoaddTempExp().

Definition at line 61 of file coaddInputRecorder.py.

Constructor & Destructor Documentation

def lsst.pipe.tasks.coaddInputRecorder.CoaddTempExpInputRecorder.__init__ (   self,
  task,
  visitId 
)

Member Function Documentation

def lsst.pipe.tasks.coaddInputRecorder.CoaddTempExpInputRecorder.addCalExp (   self,
  calExp,
  ccdId,
  nGoodPix 
)
Add a 'ccd' record for a calexp just added to the CoaddTempExp

@param[in] calExp   Calibrated exposure just added to the CoaddTempExp, or None in case of
            failures that should nonetheless be tracked.  Should be the original
            calexp, in that it should contain the original Psf and Wcs, not the
            warped and/or matched ones.
@param[in] ccdId    A unique numeric ID for the Exposure.
@param[in] nGoodPix Number of good pixels this image will contribute to the CoaddTempExp.
            If saveEmptyCcds is not set and this value is zero, no record will be
            added.

Definition at line 75 of file coaddInputRecorder.py.

75 
76  def addCalExp(self, calExp, ccdId, nGoodPix):
77  """Add a 'ccd' record for a calexp just added to the CoaddTempExp
78 
79  @param[in] calExp Calibrated exposure just added to the CoaddTempExp, or None in case of
80  failures that should nonetheless be tracked. Should be the original
81  calexp, in that it should contain the original Psf and Wcs, not the
82  warped and/or matched ones.
83  @param[in] ccdId A unique numeric ID for the Exposure.
84  @param[in] nGoodPix Number of good pixels this image will contribute to the CoaddTempExp.
85  If saveEmptyCcds is not set and this value is zero, no record will be
86  added.
87  """
88  if nGoodPix == 0 and not self.task.config.saveEmptyCcds:
89  return
90  record = self.coaddInputs.ccds.addNew()
91  record.setId(ccdId)
92  record.setL(self.task.ccdVisitKey, self.visitRecord.getId())
93  try:
94  record.setI(self.task.ccdCcdKey, calExp.getDetector().getId())
95  except:
96  self.task.log.warn("Error getting detector serial number in visit %d; using -1"
97  % self.visitRecord.getId())
98  record.setI(self.task.ccdCcdKey, -1)
99  record.setI(self.task.ccdGoodPixKey, nGoodPix)
100  if calExp is not None:
101  record.setPsf(calExp.getPsf())
102  record.setWcs(calExp.getWcs())
103  record.setBBox(calExp.getBBox())
104  record.setApCorrMap(calExp.getInfo().getApCorrMap())
105  record.setValidPolygon(calExp.getInfo().getValidPolygon())
106  if self.task.config.saveCcdWeights:
107  record.setD(self.task.ccdWeightKey, 1.0) # No weighting or overlap when warping
def lsst.pipe.tasks.coaddInputRecorder.CoaddTempExpInputRecorder.finish (   self,
  coaddTempExp,
  nGoodPix = None 
)
Finish creating the CoaddInputs for a CoaddTempExp.

@param[in,out] coaddTempExp   Exposure object from which to obtain the PSF, WCS, and bounding
                      box for the entry in the 'visits' table.  On return, the completed
                      CoaddInputs object will be attached to it.
@param[in]     nGoodPix       Total number of good pixels in the CoaddTempExp; ignored unless
                      saveVisitGoodPix is true.

Definition at line 108 of file coaddInputRecorder.py.

109  def finish(self, coaddTempExp, nGoodPix=None):
110  """Finish creating the CoaddInputs for a CoaddTempExp.
111 
112  @param[in,out] coaddTempExp Exposure object from which to obtain the PSF, WCS, and bounding
113  box for the entry in the 'visits' table. On return, the completed
114  CoaddInputs object will be attached to it.
115  @param[in] nGoodPix Total number of good pixels in the CoaddTempExp; ignored unless
116  saveVisitGoodPix is true.
117  """
118  self.visitRecord.setPsf(coaddTempExp.getPsf())
119  self.visitRecord.setWcs(coaddTempExp.getWcs())
120  self.visitRecord.setValidPolygon(coaddTempExp.getInfo().getValidPolygon())
121  self.visitRecord.setBBox(coaddTempExp.getBBox())
122  if self.task.config.saveVisitGoodPix:
123  self.visitRecord.setI(self.task.visitGoodPixKey, nGoodPix)
124  coaddTempExp.getInfo().setCoaddInputs(self.coaddInputs)
125  wcs = coaddTempExp.getWcs()
126  if False:
127  # This causes a test failure, pending fix in issue HSC-802
128  coaddTempExp.setPsf(CoaddPsf(self.coaddInputs.ccds, wcs))
129  apCorrMap = makeCoaddApCorrMap(self.coaddInputs.ccds, coaddTempExp.getBBox(afwImage.PARENT), wcs)
130  coaddTempExp.getInfo().setApCorrMap(apCorrMap)
CoaddPsf is the Psf derived to be used for non-PSF-matched Coadd images.
Definition: CoaddPsf.h:45

Member Data Documentation

lsst.pipe.tasks.coaddInputRecorder.CoaddTempExpInputRecorder.coaddInputs

Definition at line 71 of file coaddInputRecorder.py.

lsst.pipe.tasks.coaddInputRecorder.CoaddTempExpInputRecorder.task

Definition at line 70 of file coaddInputRecorder.py.

lsst.pipe.tasks.coaddInputRecorder.CoaddTempExpInputRecorder.visitRecord

Definition at line 72 of file coaddInputRecorder.py.


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