25 from ._detection 
import FootprintMergeList
 
   31                                peakDist, schema, idFactory, samePeakDist):
 
   32         """Add multiple catalogs and get the SourceCatalog with merged Footprints""" 
   35         table = afwTable.SourceTable.make(schema, idFactory)
 
   42             samePeakDist = [samePeakDist] * len(catalogs)
 
   47             peakDist = [peakDist] * len(catalogs)
 
   49         if len(peakDist) != len(catalogs):
 
   50             raise ValueError(
"Number of catalogs (%d) does not match length of peakDist (%d)" 
   51                              % (len(catalogs), len(peakDist)))
 
   53         if len(samePeakDist) != len(catalogs):
 
   54             raise ValueError(
"Number of catalogs (%d) does not match length of samePeakDist (%d)" 
   55                              % (len(catalogs), len(samePeakDist)))
 
   57         if len(filters) != len(catalogs):
 
   58             raise ValueError(
"Number of catalogs (%d) does not match number of filters (%d)" 
   59                              % (len(catalogs), len(filters)))
 
   62         for cat, filter, dist, sameDist 
in zip(catalogs, filters, peakDist, samePeakDist):
 
   63             self.addCatalog(table, cat, filter, dist, 
True, sameDist)
 
   65         self.getFinalSources(mergedList)