36 footprint1: Footprint,
37 footprint2: Footprint,
38 copyPeaks: bool =
True,
40 """Calculate the intersection of two Footprints.
49 Whether or not to copy the peaks from the first Footprint.
54 The Footprint containing the intersection of the two footprints.
57 spans = footprint1.spans.intersect(footprint2.spans)
59 result.setPeakSchema(footprint1.peaks.getSchema())
63 for peak
in footprint1.peaks:
64 if spans.contains(
Point2I(peak.getIx(), peak.getIy())):
66 result.peaks.append(peak)