LSSTApplications  18.1.0
LSSTDataManagementBasePackage
Public Member Functions | List of all members
lsst.afw.detection.footprintMerge.footprintMergeContinued.FootprintMergeList Class Reference

Public Member Functions

def getMergedSourceCatalog (self, catalogs, filters, peakDist, schema, idFactory, samePeakDist)
 

Detailed Description

Definition at line 8 of file footprintMergeContinued.py.

Member Function Documentation

◆ getMergedSourceCatalog()

def lsst.afw.detection.footprintMerge.footprintMergeContinued.FootprintMergeList.getMergedSourceCatalog (   self,
  catalogs,
  filters,
  peakDist,
  schema,
  idFactory,
  samePeakDist 
)
Add multiple catalogs and get the SourceCatalog with merged Footprints

Definition at line 10 of file footprintMergeContinued.py.

10  peakDist, schema, idFactory, samePeakDist):
11  """Add multiple catalogs and get the SourceCatalog with merged Footprints"""
12  import lsst.afw.table as afwTable
13 
14  table = afwTable.SourceTable.make(schema, idFactory)
15  mergedList = afwTable.SourceCatalog(table)
16 
17  # if peak is not an array, create an array the size of catalogs
18  try:
19  len(samePeakDist)
20  except TypeError:
21  samePeakDist = [samePeakDist] * len(catalogs)
22 
23  try:
24  len(peakDist)
25  except TypeError:
26  peakDist = [peakDist] * len(catalogs)
27 
28  if len(peakDist) != len(catalogs):
29  raise ValueError("Number of catalogs (%d) does not match length of peakDist (%d)"
30  % (len(catalogs), len(peakDist)))
31 
32  if len(samePeakDist) != len(catalogs):
33  raise ValueError("Number of catalogs (%d) does not match length of samePeakDist (%d)"
34  % (len(catalogs), len(samePeakDist)))
35 
36  if len(filters) != len(catalogs):
37  raise ValueError("Number of catalogs (%d) does not match number of filters (%d)"
38  % (len(catalogs), len(filters)))
39 
40  self.clearCatalog()
41  for cat, filter, dist, sameDist in zip(catalogs, filters, peakDist, samePeakDist):
42  self.addCatalog(table, cat, filter, dist, True, sameDist)
43 
44  self.getFinalSources(mergedList)
45  return mergedList

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