LSSTApplications  19.0.0-14-gb0260a2+599893a4c6,20.0.0+126303c00d,20.0.0+2f3d0e5c40,20.0.0+36ef800059,20.0.0+5ac7adcc0c,20.0.0+693a64958a,20.0.0+bebc1f60e8,20.0.0+cad136aba6,20.0.0+e2e26847c2,20.0.0+e69b5d60e7,20.0.0-1-g10df615+11b215b765,20.0.0-1-g253301a+36ef800059,20.0.0-1-g2b7511a+bebc1f60e8,20.0.0-1-g4d801e7+aeeb640673,20.0.0-1-g5b95a8c+f111d5f02f,20.0.0-1-g660595b+f45b7d88f4,20.0.0-1-gc96f8cb+e3b38461e6,20.0.0-1-gd1c87d7+85c46248f3,20.0.0-1-gedffbd8+d0b27f8bcb,20.0.0-16-g111fe95+e3b38461e6,20.0.0-16-g18096c8+d1a4df0137,20.0.0-16-g233ea98+a4df35922d,20.0.0-17-ga9337b4+41f27cfd54,20.0.0-2-g4dae9ad+e3b38461e6,20.0.0-2-g7818986+85c46248f3,20.0.0-2-gec03fae+ff10c6d78d,20.0.0-28-g282f9e7e+feda6aebd8,20.0.0-3-g4cc78c6+63636aeed8,20.0.0-3-g6a8623c+d1a4df0137,20.0.0-3-g750bffe+f5427621ce,20.0.0-4-gfea843c+f45b7d88f4,20.0.0-5-g357b56b+f45b7d88f4,20.0.0-5-gfcebe35+e2b15ed341,20.0.0-52-g73d9071+9bf1eb8e0a,20.0.0-7-gcda7bf1+773ba852cb,20.0.0-8-g4540fe2a+952f6d3c43,20.0.0-9-g61a2a9a3d+14f89e4eca,w.2020.40
LSSTDataManagementBasePackage
Public Member Functions | Static Public Attributes | List of all members
lsst.synpipe.mergeOnlyFakes.OnlyFakesMergeTask Class Reference
Inheritance diagram for lsst.synpipe.mergeOnlyFakes.OnlyFakesMergeTask:

Public Member Functions

def runDataRef (self, patchRef)
 

Static Public Attributes

 ConfigClass
 

Detailed Description

This task serves culls the source list to sources which overlap with fakes

Definition at line 22 of file mergeOnlyFakes.py.

Member Function Documentation

◆ runDataRef()

def lsst.synpipe.mergeOnlyFakes.OnlyFakesMergeTask.runDataRef (   self,
  patchRef 
)
Measure and deblend

Definition at line 29 of file mergeOnlyFakes.py.

29  def runDataRef(self, patchRef):
30  """Measure and deblend"""
31 
32  exposure = patchRef.get(self.config.coaddName + "Coadd", immediate=True)
33 
34  """Read in the FAKE mask plane"""
35  mask = exposure.getMaskedImage().getMask()
36  fakebit = mask.getPlaneBitMask('FAKE')
37 
38  sources = self.readSources(patchRef)
39  self.log.info("Found %d sources" % len(sources))
40  """ignore objects whose footprints do NOT overlap with the 'FAKE' mask"""
41  removes = []
42  for i_ss, ss in enumerate(sources):
43  foot = ss.getFootprint()
44  footTmp = afwDetect.Footprint(foot)
45  footTmp.intersectMask(mask, fakebit)
46  if footTmp.getArea() == foot.getArea():
47  removes.append(i_ss)
48  removes = sorted(removes, reverse=True)
49  for r in removes:
50  del sources[r]
51  self.log.info("Found %d sources near fake footprints" % len(sources))
52 
53  if self.config.doDeblend:
54  self.deblend.run(exposure, sources, exposure.getPsf())
55 
56  bigKey = sources.schema["deblend.parent-too-big"].asKey()
57  # catalog is non-contiguous so can't extract column
58  numBig = sum((s.get(bigKey) for s in sources))
59  if numBig > 0:
60  self.log.warn("Patch %s contains %d large footprints that were not deblended" %
61  (patchRef.dataId, numBig))
62  self.measurement.run(exposure, sources)
63  skyInfo = getSkyInfo(coaddName=self.config.coaddName, patchRef=patchRef)
64  self.setPrimaryFlags.run(sources, skyInfo.skyMap, skyInfo.tractInfo, skyInfo.patchInfo,
65  includeDeblend=self.config.doDeblend)
66  self.propagateFlags.run(patchRef.getButler(), sources, self.propagateFlags.getCcdInputs(exposure),
67  exposure.getWcs())
68  if self.config.doMatchSources:
69  self.writeMatches(patchRef, exposure, sources)
70 
71  self.write(patchRef, sources)

Member Data Documentation

◆ ConfigClass

lsst.synpipe.mergeOnlyFakes.OnlyFakesMergeTask.ConfigClass
static

Definition at line 27 of file mergeOnlyFakes.py.


The documentation for this class was generated from the following file:
lsst::log.log.logContinued.warn
def warn(fmt, *args)
Definition: logContinued.py:205
lsst::log.log.logContinued.info
def info(fmt, *args)
Definition: logContinued.py:201
lsst.pipe.tasks.coaddBase.getSkyInfo
def getSkyInfo(coaddName, patchRef)
Return the SkyMap, tract and patch information, wcs, and outer bbox of the patch to be coadded.
Definition: coaddBase.py:261
lsst.pipe.tasks.assembleCoadd.run
def run(self, skyInfo, tempExpRefList, imageScalerList, weightList, altMaskList=None, mask=None, supplementaryData=None)
Definition: assembleCoadd.py:720
lsst::afw::detection::Footprint
Class to describe the properties of a detected object from an image.
Definition: Footprint.h:63