Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-8467: Wrap lsst_distrib with pybind11 #30

Merged
merged 1 commit into from
Mar 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
47 changes: 0 additions & 47 deletions python/lsst/obs/sdss/cameraGeom.py

This file was deleted.

2 changes: 1 addition & 1 deletion python/lsst/obs/sdss/convertOpECalib.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import print_function
from __future__ import absolute_import, division, print_function
from builtins import range
import os

Expand Down
2 changes: 1 addition & 1 deletion python/lsst/obs/sdss/convertasTrans.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import print_function
from __future__ import absolute_import, division, print_function
from builtins import map
from builtins import range
from builtins import object
Expand Down
10 changes: 5 additions & 5 deletions python/lsst/obs/sdss/convertfpM.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import print_function
from __future__ import absolute_import, division, print_function
from builtins import range
from builtins import object
#
Expand Down Expand Up @@ -129,9 +129,9 @@ def convertfpM(infile, allPlanes=False):
satPlane = planes.index("S_MASK_SATUR") + 1
crPlane = planes.index("S_MASK_CR") + 1

interpBitMask = afwImage.MaskU_getPlaneBitMask("INTRP")
satBitMask = afwImage.MaskU_getPlaneBitMask("SAT")
crBitMask = afwImage.MaskU_getPlaneBitMask("CR")
interpBitMask = afwImage.MaskU.getPlaneBitMask("INTRP")
satBitMask = afwImage.MaskU.getPlaneBitMask("SAT")
crBitMask = afwImage.MaskU.getPlaneBitMask("CR")

listToSet = [(interpPlane, interpBitMask),
(satPlane, satBitMask),
Expand All @@ -144,7 +144,7 @@ def convertfpM(infile, allPlanes=False):
idx = planes.index(plane) + 1
planeName = re.sub("S_MASK_", "", plane)
planeId = mask.addMaskPlane(planeName)
planeBitMask = afwImage.MaskU_getPlaneBitMask(planeName)
planeBitMask = afwImage.MaskU.getPlaneBitMask(planeName)
listToSet.append((idx, planeBitMask))

for plane, bitmask in listToSet:
Expand Down
6 changes: 3 additions & 3 deletions python/lsst/obs/sdss/convertpsField.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import print_function
from __future__ import absolute_import, division, print_function
from builtins import range
#
# LSST Data Management System
Expand Down Expand Up @@ -51,7 +51,7 @@ def convertpsField(infile, filt, trim=True, rcscale=0.001, MAX_ORDER_B=5, LSST_O
pstruct = pyfits.getdata(buff, ext=filtToHdu[filt])

spaParList = [[]]*len(pstruct)
kernelList = afwMath.KernelList()
kernelList = []
for i in range(len(pstruct)):
nrow_b = pstruct[i][0] # ny
ncol_b = pstruct[i][1] # nx
Expand All @@ -66,7 +66,7 @@ def convertpsField(infile, filt, trim=True, rcscale=0.001, MAX_ORDER_B=5, LSST_O

kim = afwImage.ImageD(karr)
kern = afwMath.FixedKernel(kim)
kernelList.push_back(kern)
kernelList.append(kern)

# NOTES:

Expand Down
2 changes: 1 addition & 1 deletion python/lsst/obs/sdss/converttsField.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import print_function
from __future__ import absolute_import, division, print_function
#
# LSST Data Management System
# Copyright 2008, 2009, 2010 LSST Corporation.
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/obs/sdss/makeCamera.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import print_function
from __future__ import absolute_import, division, print_function
from builtins import str
from builtins import range
#
Expand Down
7 changes: 4 additions & 3 deletions python/lsst/obs/sdss/scaleSdssZeroPoint.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import, division, print_function
from builtins import zip
from builtins import range
from builtins import object
Expand Down Expand Up @@ -59,7 +60,7 @@ def __init__(self, interpStyle, xList, yList, scaleList):
"len(xList)=%s len(yList)=%s, len(scaleList)=%s but all lists must have the same length" %
(len(xList), len(yList), len(scaleList)))

self.interpStyle = getattr(afwMath.Interpolate, interpStyle)
self.interpStyle = afwMath.stringToInterpStyle(interpStyle)
self._xList = xList
self._yList = yList
self._scaleList = scaleList
Expand All @@ -85,8 +86,8 @@ def getInterpImage(self, bbox):

x, z = list(zip(*sorted(zip(self._xList, self._scaleList))))

xvec = afwMath.vectorD(x)
zvec = afwMath.vectorD(z)
xvec = np.array(x, dtype=float)
zvec = np.array(z, dtype=float)
height = bbox.getHeight()
width = bbox.getWidth()
x0, y0 = bbox.getMin()
Expand Down
1 change: 1 addition & 0 deletions python/lsst/obs/sdss/sdssMapper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import, division, print_function
from builtins import map
#
# LSST Data Management System
Expand Down
6 changes: 3 additions & 3 deletions python/lsst/obs/sdss/sdssNullIsr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
#
# LSST Data Management System
# Copyright 2008-2015 AURA/LSST.
Expand All @@ -20,6 +19,7 @@
# the GNU General Public License along with this program. If not,
# see <https://www.lsstcorp.org/LegalNotices/>.
#
from __future__ import absolute_import, division, print_function
import lsst.pex.config as pexConfig
import lsst.pipe.base as pipeBase
import lsst.afw.image as afwImage
Expand Down Expand Up @@ -127,12 +127,12 @@ def loadExposure(self, sensorRef):
mi = afwImage.MaskedImageF(image, mask, var)

if self.config.removeOverlap:
bbox = mi.getBBox(afwImage.LOCAL)
bbox = mi.getBBox()
begin = bbox.getBegin()
extent = bbox.getDimensions()
extent -= afwGeom.Extent2I(0, self.config.overlapSize)
tbbox = afwGeom.BoxI(begin, extent)
mi = afwImage.MaskedImageF(mi, tbbox, True)
mi = afwImage.MaskedImageF(mi, tbbox)

exposure = afwImage.ExposureF(mi, wcs)
expInfo = exposure.getInfo()
Expand Down
1 change: 1 addition & 0 deletions python/lsst/obs/sdss/selectFluxMag0.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import, division, print_function
from builtins import str
from builtins import range
#!/usr/bin/env python
Expand Down
1 change: 1 addition & 0 deletions python/lsst/obs/sdss/selectSdssImages.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import, division, print_function
from builtins import range
#!/usr/bin/env python
#
Expand Down
2 changes: 1 addition & 1 deletion tests/testSelectFluxMag0.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import unittest
import sys

import lsst.utils.tests as utilsTests
import lsst.utils.tests
import lsst.daf.base
from lsst.daf.persistence import DbAuth
import lsst.afw.geom as afwGeom
Expand Down