-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #372 from lsst/tickets/DM-14864
DM-14864: Make afw pybind11 wrappers compatible with pybind11 2.2
- Loading branch information
Showing
144 changed files
with
584 additions
and
1,645 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,7 @@ | ||
## -*- python -*- | ||
from lsst.sconsUtils import scripts | ||
scripts.BasicSConscript.pybind11(['cameraSys', | ||
'detector', | ||
'detector/detector', | ||
'orientation', | ||
'transformMap']) | ||
|
||
#from lsst.sconsUtils import env, targets | ||
# | ||
## We can't use BasicSConscript here because the circular dependency requires the -D option in SWIGFLAGS | ||
#targets["python"].extend( | ||
# env.SwigLoadableModule( | ||
# "_cameraGeomLib", ["cameraGeomLib.i"], | ||
# SWIGFLAGS=(env["SWIGFLAGS"] + ["-DIMPORT_IMAGE_I"]), | ||
# LIBS=env.getLibs("main python") | ||
# ) | ||
#) | ||
'transformMap'], | ||
addUnderscore=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from lsst.afw.geom import Point2D | ||
from ._cameraSys import * | ||
from .cameraSys import * | ||
from .detector import * | ||
from ._orientation import * | ||
from ._transformMap import * | ||
from .orientation import * | ||
from .transformMap import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from .detector import * | ||
from .detectorContinued import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
## -*- python -*- | ||
from lsst.sconsUtils import scripts | ||
scripts.BasicSConscript.pybind11(['observatory', | ||
'weather']) | ||
'weather'], | ||
addUnderscore=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from .footprintMerge import * | ||
from .footprintMergeContinued import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
python/lsst/afw/detection/footprintMerge/footprintMergeContinued.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
__all__ = [] # only imported for side effects | ||
|
||
from lsst.utils import continueClass | ||
from .footprintMerge import FootprintMergeList | ||
|
||
|
||
@continueClass # noqa F811 | ||
class FootprintMergeList: | ||
def getMergedSourceCatalog(self, catalogs, filters, | ||
peakDist, schema, idFactory, samePeakDist): | ||
"""Add multiple catalogs and get the SourceCatalog with merged Footprints""" | ||
import lsst.afw.table as afwTable | ||
|
||
table = afwTable.SourceTable.make(schema, idFactory) | ||
mergedList = afwTable.SourceCatalog(table) | ||
|
||
# if peak is not an array, create an array the size of catalogs | ||
try: | ||
len(samePeakDist) | ||
except TypeError: | ||
samePeakDist = [samePeakDist] * len(catalogs) | ||
|
||
try: | ||
len(peakDist) | ||
except TypeError: | ||
peakDist = [peakDist] * len(catalogs) | ||
|
||
if len(peakDist) != len(catalogs): | ||
raise ValueError("Number of catalogs (%d) does not match length of peakDist (%d)" | ||
% (len(catalogs), len(peakDist))) | ||
|
||
if len(samePeakDist) != len(catalogs): | ||
raise ValueError("Number of catalogs (%d) does not match length of samePeakDist (%d)" | ||
% (len(catalogs), len(samePeakDist))) | ||
|
||
if len(filters) != len(catalogs): | ||
raise ValueError("Number of catalogs (%d) does not match number of filters (%d)" | ||
% (len(catalogs), len(filters))) | ||
|
||
self.clearCatalog() | ||
for cat, filter, dist, sameDist in zip(catalogs, filters, peakDist, samePeakDist): | ||
self.addCatalog(table, cat, filter, dist, True, sameDist) | ||
|
||
self.getFinalSources(mergedList) | ||
return mergedList |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.