コード例 #1
0
def run():
    memId0 = dafBase.Citizen_getNextMemId()
    main()
    # check for memory leaks
    if dafBase.Citizen_census(0, memId0) != 0:
        print(dafBase.Citizen_census(0, memId0), 'Objects leaked:')
        print(dafBase.Citizen_census(dafBase.cout, memId0))
コード例 #2
0
def run():
    Log.getDefaultLog()
    memId0 = dafBase.Citizen_getNextMemId()
    main()
    # check for memory leaks
    if dafBase.Citizen_census(0, memId0) != 0:
        print dafBase.Citizen_census(0, memId0), 'Objects leaked:'
        print dafBase.Citizen_census(dafBase.cout, memId0)
コード例 #3
0
ファイル: warpExposure.py プロジェクト: brianv0/afw
    destExposurePath = args[2]
    print("Remapping exposure      :", srcExposurePath)
    print("to match wcs and bbox of:", refExposurePath)
    print("using", kernelName, "kernel")

    warpingControl = afwMath.WarpingControl(kernelName)

    srcExposure = afwImage.ExposureF(srcExposurePath)

    destExposure = afwImage.ExposureF(refExposurePath)

    if opt.verbosity > 0:
        print("Verbosity =", opt.verbosity)
        logUtils.traceSetAt("afw.math.warp", opt.verbosity)

    numGoodPixels = afwMath.warpExposure(destExposure, srcExposure,
                                         warpingControl)
    print("Warped exposure has %s good pixels" % (numGoodPixels))

    print("Writing warped exposure to %s" % (destExposurePath, ))
    destExposure.writeFits(destExposurePath)


if __name__ == "__main__":
    memId0 = dafBase.Citizen_getNextMemId()
    main()
    # check for memory leaks
    if dafBase.Citizen_census(0, memId0) != 0:
        print(dafBase.Citizen_census(0, memId0), "Objects leaked:")
        print(dafBase.Citizen_census(dafBase.cout, memId0))