4 from .footprintMerge
import FootprintMergeList
10 peakDist, schema, idFactory, samePeakDist):
11 """Add multiple catalogs and get the SourceCatalog with merged Footprints""" 14 table = afwTable.SourceTable.make(schema, idFactory)
21 samePeakDist = [samePeakDist] * len(catalogs)
26 peakDist = [peakDist] * len(catalogs)
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)))
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)))
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)))
41 for cat, filter, dist, sameDist
in zip(catalogs, filters, peakDist, samePeakDist):
42 self.addCatalog(table, cat, filter, dist,
True, sameDist)
44 self.getFinalSources(mergedList)