Skip to content

Commit

Permalink
import numpy as np per RFC-34
Browse files Browse the repository at this point in the history
  • Loading branch information
yalsayyad committed Apr 3, 2017
1 parent 0463db3 commit 5a8797d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/lsst/ip/diffim/modelPsfMatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from __future__ import absolute_import, division, print_function

from builtins import range
import numpy as num
import numpy as np

from . import diffimLib
import lsst.afw.geom as afwGeom
Expand All @@ -38,11 +38,11 @@

__all__ = ("ModelPsfMatchTask", "ModelPsfMatchConfig")

sigma2fwhm = 2. * num.sqrt(2. * num.log(2.))
sigma2fwhm = 2. * np.sqrt(2. * np.log(2.))


def nextOddInteger(x):
nextInt = int(num.ceil(x))
nextInt = int(np.ceil(x))
return nextInt + 1 if nextInt % 2 == 0 else nextInt


Expand Down Expand Up @@ -311,11 +311,11 @@ def run(self, exposure, referencePsfModel, kernelSum=1.0):
spatialSolution, psfMatchingKernel, backgroundModel = self._solve(kernelCellSet, basisList)

if psfMatchingKernel.isSpatiallyVarying():
sParameters = num.array(psfMatchingKernel.getSpatialParameters())
sParameters = np.array(psfMatchingKernel.getSpatialParameters())
sParameters[0][0] = kernelSum
psfMatchingKernel.setSpatialParameters(sParameters)
else:
kParameters = num.array(psfMatchingKernel.getKernelParameters())
kParameters = np.array(psfMatchingKernel.getKernelParameters())
kParameters[0] = kernelSum
psfMatchingKernel.setKernelParameters(kParameters)

Expand Down

0 comments on commit 5a8797d

Please sign in to comment.