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 | Static Public Attributes | Static Private Attributes | List of all members
lsst.pipe.tasks.imageDifference.Winter2013ImageDifferenceTask Class Reference
Inheritance diagram for lsst.pipe.tasks.imageDifference.Winter2013ImageDifferenceTask:
lsst.pipe.tasks.imageDifference.ImageDifferenceTask

Public Member Functions

def __init__
 
def getTemplate
 
def fitAstrometry
 
- Public Member Functions inherited from lsst.pipe.tasks.imageDifference.ImageDifferenceTask
def __init__
 
def run
 
def fitAstrometry
 
def runDebug
 
def getTemplate
 
def getSchemaCatalogs
 

Static Public Attributes

 ConfigClass = Winter2013ImageDifferenceConfig
 
- Static Public Attributes inherited from lsst.pipe.tasks.imageDifference.ImageDifferenceTask
 ConfigClass = ImageDifferenceConfig
 

Static Private Attributes

string _DefaultName = "winter2013ImageDifference"
 

Additional Inherited Members

- Public Attributes inherited from lsst.pipe.tasks.imageDifference.ImageDifferenceTask
 sourceSelector
 
 astrometer
 
 schema
 
 algMetadata
 

Detailed Description

Definition at line 770 of file imageDifference.py.

Constructor & Destructor Documentation

def lsst.pipe.tasks.imageDifference.Winter2013ImageDifferenceTask.__init__ (   self,
  kwargs 
)

Definition at line 774 of file imageDifference.py.

775  def __init__(self, **kwargs):
776  ImageDifferenceTask.__init__(self, **kwargs)

Member Function Documentation

def lsst.pipe.tasks.imageDifference.Winter2013ImageDifferenceTask.fitAstrometry (   self,
  templateSources,
  templateExposure,
  selectSources 
)
Fit the relative astrometry between templateSources and selectSources

Definition at line 800 of file imageDifference.py.

801  def fitAstrometry(self, templateSources, templateExposure, selectSources):
802  """Fit the relative astrometry between templateSources and selectSources"""
803  if self.config.winter2013WcsShift > 0.0:
804  offset = afwGeom.Extent2D(self.config.winter2013WcsShift,
805  self.config.winter2013WcsShift)
806  cKey = templateSources[0].getTable().getCentroidKey()
807  for source in templateSources:
808  centroid = source.get(cKey)
809  source.set(cKey, centroid+offset)
810  elif self.config.winter2013WcsRms > 0.0:
811  cKey = templateSources[0].getTable().getCentroidKey()
812  for source in templateSources:
813  offset = afwGeom.Extent2D(self.config.winter2013WcsRms*numpy.random.normal(),
814  self.config.winter2013WcsRms*numpy.random.normal())
815  centroid = source.get(cKey)
816  source.set(cKey, centroid+offset)
817 
818  results = self.register.run(templateSources, templateExposure.getWcs(),
819  templateExposure.getBBox(), selectSources)
820  return results
def lsst.pipe.tasks.imageDifference.Winter2013ImageDifferenceTask.getTemplate (   self,
  exposure,
  sensorRef 
)
Return a template coadd exposure that overlaps the exposure

@param[in] exposure: exposure
@param[in] sensorRef: a Butler data reference that can be used to obtain coadd data

@return coaddExposure: a template coadd exposure assembled out of patches

Definition at line 777 of file imageDifference.py.

778  def getTemplate(self, exposure, sensorRef):
779  """Return a template coadd exposure that overlaps the exposure
780 
781  @param[in] exposure: exposure
782  @param[in] sensorRef: a Butler data reference that can be used to obtain coadd data
783 
784  @return coaddExposure: a template coadd exposure assembled out of patches
785  """
786  # Using a deep simulated calexp instead of a coadd
787  self.log.warn("USING WINTER2013 : DEEP CALEXP AS TEMPLATE")
788  templateId = type(sensorRef.dataId)(sensorRef.dataId)
789  templateId["visit"] = self.config.winter2013TemplateId
790  template = sensorRef.getButler().get(datasetType="calexp", dataId=templateId)
791  if self.config.doAddCalexpBackground:
792  templateBg = sensorRef.getButler().get(datasetType="calexpBackground", dataId=templateId)
793  mi = template.getMaskedImage()
794  mi += templateBg
795  if not template.hasPsf():
796  raise pipeBase.TaskError("Template has no psf")
797  templateSources = sensorRef.getButler().get(datasetType="src", dataId=templateId)
798  return template, templateSources
799 

Member Data Documentation

string lsst.pipe.tasks.imageDifference.Winter2013ImageDifferenceTask._DefaultName = "winter2013ImageDifference"
staticprivate

Definition at line 772 of file imageDifference.py.

lsst.pipe.tasks.imageDifference.Winter2013ImageDifferenceTask.ConfigClass = Winter2013ImageDifferenceConfig
static

Definition at line 771 of file imageDifference.py.


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