=============================================================================================== test session starts =============================================================================================== platform linux -- Python 3.6.2, pytest-3.2.0, py-1.4.34, pluggy-0.4.0 rootdir: /home/chiba/Research/project237/my_packages/meas_extensions_shapeHSM, inifile: plugins: session2file-0.1.9, forked-0.2, xdist-1.20.1, flake8-0.9.1 collecting 0 items collecting 4 items collecting 6 items collecting 6 items collected 6 items run-last-failure: rerun previous 3 failures tests/testHsm.py FFF ------------------------------------ generated xml file: /home/chiba/Research/project237/my_packages/meas_extensions_shapeHSM/tests/.tests/pytest-meas_extensions_shapeHSM.xml ------------------------------------ ==================================================================================================== FAILURES ===================================================================================================== ___________________________________________________________________________________________ ShapeTestCase.testHsmShape ____________________________________________________________________________________________ self = scons opt=3 def testHsmShape(self): """Test that we can instantiate and play with a measureShape""" nFail = 0 msg = "" for (algNum, algName), (i, imageid) in itertools.product(enumerate(correction_methods), enumerate(file_indices)): algorithmName = "ext_shapeHSM_HsmShape" + algName[0:1].upper() + algName[1:].lower() > source = self.runMeasurement(algorithmName, imageid, x_centroid[i], y_centroid[i], sky_var[i]) tests/testHsm.py:240: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , algorithmName = 'ext_shapeHSM_HsmShapeKsb', imageid = 0, x = 35.888, y = 19.845, v = 35.01188 def runMeasurement(self, algorithmName, imageid, x, y, v): """Run the measurement algorithm on an image""" # load the test image imgFile = os.path.join(self.dataDir, "image.%d.fits" % imageid) img = afwImage.ImageF(imgFile) img -= self.bkgd nx, ny = img.getWidth(), img.getHeight() msk = afwImage.Mask(afwGeom.Extent2I(nx, ny), 0x0) var = afwImage.ImageF(afwGeom.Extent2I(nx, ny), v) mimg = afwImage.MaskedImageF(img, msk, var) msk.getArray()[:] = np.where(np.fabs(img.getArray()) < 1.0e-8, msk.getPlaneBitMask("BAD"), 0) # Put it in a bigger image, in case it matters big = afwImage.MaskedImageF(self.offset + mimg.getDimensions()) big.getImage().set(0) big.getMask().set(0) big.getVariance().set(v) subBig = afwImage.MaskedImageF(big, afwGeom.Box2I(big.getXY0() + self.offset, mimg.getDimensions())) subBig <<= mimg mimg = big mimg.setXY0(self.xy0) exposure = afwImage.makeExposure(mimg) cdMatrix = np.array([1.0/(2.53*3600.0), 0.0, 0.0, 1.0/(2.53*3600.0)]) cdMatrix.shape = (2, 2) exposure.setWcs(afwGeom.makeSkyWcs(crpix=afwGeom.Point2D(1.0, 1.0), crval=afwGeom.SpherePoint(0, 0, afwGeom.degrees), > cdMatrix=cdMatrix)) E TypeError: makeSkyWcs(): incompatible function arguments. The following argument types are supported: E 1. (crpix: lsst.afw.geom.coordinates.coordinates.Point2D, crval: lsst::afw::coord::IcrsCoord, cdMatrix: Eigen::Matrix, projection: str='TAN') -> lsst::afw::geom::SkyWcs E 2. (metadata: lsst.daf.base.propertyContainer.propertySet.PropertySet, strip: bool=False) -> lsst::afw::geom::SkyWcs E E Invoked with: kwargs: crpix=Point2D(1, 1), crval=SpherePoint(0.0*afwGeom.degrees, 0.0*afwGeom.degrees), cdMatrix=array([[ 0.00010979, 0. ], E [ 0. , 0.00010979]]) tests/testHsm.py:201: TypeError _______________________________________________________________________________________ ShapeTestCase.testHsmSourceMoments ________________________________________________________________________________________ self = def testHsmSourceMoments(self): for (i, imageid) in enumerate(file_indices): source = self.runMeasurement("ext_shapeHSM_HsmSourceMoments", imageid, > x_centroid[i], y_centroid[i], sky_var[i]) tests/testHsm.py:291: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , algorithmName = 'ext_shapeHSM_HsmSourceMoments', imageid = 0, x = 35.888, y = 19.845, v = 35.01188 def runMeasurement(self, algorithmName, imageid, x, y, v): """Run the measurement algorithm on an image""" # load the test image imgFile = os.path.join(self.dataDir, "image.%d.fits" % imageid) img = afwImage.ImageF(imgFile) img -= self.bkgd nx, ny = img.getWidth(), img.getHeight() msk = afwImage.Mask(afwGeom.Extent2I(nx, ny), 0x0) var = afwImage.ImageF(afwGeom.Extent2I(nx, ny), v) mimg = afwImage.MaskedImageF(img, msk, var) mskscons opt=3.getArray()[:] = np.where(np.fabs(img.getArray()) < 1.0e-8, msk.getPlaneBitMask("BAD"), 0) # Put it in a bigger image, in case it matters big = afwImage.MaskedImageF(self.offset + mimg.getDimensions()) big.getImage().set(0) big.getMask().set(0) big.getVariance().set(v) subBig = afwImage.MaskedImageF(big, afwGeom.Box2I(big.getXY0() + self.offset, mimg.getDimensions())) subBig <<= mimg mimg = big mimg.setXY0(self.xy0) exposure = afwImage.makeExposure(mimg) cdMatrix = np.array([1.0/(2.53*3600.0), 0.0, 0.0, 1.0/(2.53*3600.0)]) cdMatrix.shape = (2, 2) exposure.setWcs(afwGeom.makeSkyWcs(crpix=afwGeom.Point2D(1.0, 1.0), crval=afwGeom.SpherePoint(0, 0, afwGeom.degrees), > cdMatrix=cdMatrix)) E TypeError: makeSkyWcs(): incompatible function arguments. The following argument types are supported: E 1. (crpix: lsst.afw.geom.coordinates.coordinates.Point2D, crval: lsst::afw::coord::IcrsCoord, cdMatrix: Eigen::Matrix, projection: str='TAN') -> lsst::afw::geom::SkyWcs E 2. (metadata: lsst.daf.base.propertyContainer.propertySet.PropertySet, strip: bool=False) -> lsst::afw::geom::SkyWcs E E Invoked with: kwargs: crpix=Point2D(1, 1), crval=SpherePoint(0.0*afwGeom.degrees, 0.0*afwGeom.degrees), cdMatrix=array([[ 0.00010979, 0. ], E [ 0. , 0.00010979]]) tests/testHsm.py:201: TypeError _____________________________________________________________________________________ ShapeTestCase.testHsmSourceMomentsRound _____________________________________________________________________________________ self = def testHsmSourceMomentsRound(self): for (i, imageid) in enumerate(file_indices): source = self.runMeasurement("ext_shapeHSM_HsmSourceMomentsRound", imageid, > x_centroid[i], y_centroid[i], sky_var[i]) tests/testHsm.py:313: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , algorithmName = 'ext_shapeHSM_HsmSourceMomentsRound', imageid = 0, x = 35.888, y = 19.845, v = 35.01188 def runMeasurement(self, algorithmName, imageid, x, y, v): """Run the measurement algorithm on an image""" # load the test image imgFile = os.path.join(self.dataDir, "image.%d.fits" % imageid) img = afwImage.ImageF(imgFile) img -= self.bkgd nx, ny = img.getWidth(), img.getHeight() msk = afwImage.Mask(afwGeom.Extent2I(nx, ny), 0x0) var = afwImage.ImageF(afwGeom.Extent2I(nx, ny), v) mimg = afwImage.MaskedImageF(img, msk, var) msk.getArray()[:] = np.where(np.fabs(img.getArray()) < 1.0e-8, msk.getPlaneBitMask("BAD"), 0) # Put it in a bigger image, in case it matters big = afwImage.MaskedImageF(self.offset + mimg.getDimensions()) big.getImage().set(0) big.getMask().set(0) big.getVariance().set(v) subBig = afwImage.MaskedImageF(big, afwGeom.Box2I(big.getXY0() + self.offset, mimg.getDimensions())) subBig <<= mimg mimg = big mimg.setXY0(self.xy0) exposure = afwImage.makeExposure(mimg) cdMatrix = np.array([1.0/(2.53*3600.0), 0.0, 0.0, 1.0/(2.53*3600.0)]) cdMatrix.shape = (2, 2) exposure.setWcs(afwGeom.makeSkyWcs(crpix=afwGeom.Point2D(1.0, 1.0), crval=afwGeom.SpherePoint(0, 0, afwGeom.degrees), > cdMatrix=cdMatrix)) E TypeError: makeSkyWcs(): incompatible function arguments. The following argument types are supported: E 1. (crpix: lsst.afw.geom.coordinates.coordinates.Point2D, crval: lsst::afw::coord::IcrsCoord, cdMatrix: Eigen::Matrix, projection: str='TAN') -> lsst::afw::geom::SkyWcs E 2. (metadata: lsst.daf.base.propertyContainer.propertySet.PropertySet, strip: bool=False) -> lsst::afw::geom::SkyWcs E E Invoked with: kwargs: crpix=Point2D(1, 1), crval=SpherePoint(0.0*afwGeom.degrees, 0.0*afwGeom.degrees), cdMatrix=array([[ 0.00010979, 0. ], E [ 0. , 0.00010979]]) tests/testHsm.py:201: TypeError =============================================================================================== 3 tests deselected ================================================================================================ ===================================================================================== 3 failed, 3 deselected in 1.19 seconds ====================================================================================== Global pytest run: failed scons: Nothing to be done for `doc'. Failed test output: Global pytest output is in /home/chiba/Research/project237/my_packages/meas_extensions_shapeHSM/tests/.tests/pytest-meas_extensions_shapeHSM.xml.failed The following tests failed: /home/chiba/Research/project237/my_packages/meas_extensions_shapeHSM/tests/.tests/pytest-meas_extensions_shapeHSM.xml.failed 1 tests failed scons: *** [checkTestStatus] Error 1 scons: building terminated because of errors.