Skip to content

Commit

Permalink
Add placeholders in tests for setting trace logging verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
Hsin-Fang Chiang committed Aug 5, 2016
1 parent d3a95a8 commit d629d81
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/CoaddPsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import lsst.utils.tests as utilsTests
import lsst.pex.exceptions as pexExceptions
import lsst.pex.logging as logging
from lsst.log import Log

import lsst.afw.geom as afwGeom
import lsst.afw.math as afwMath
Expand All @@ -50,6 +51,9 @@
logging.Trace.setVerbosity("afw.detection.Psf", verbose)
display = False

Log.getLogger("meas.algorithms.Interp").setLevel(Log.INFO)
Log.getLogger("afw.detection.Psf").setLevel(Log.INFO)

#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
def getPsfMoments(psf, point):
# import os, pdb; print "PID =", os.getpid(); pdb.set_trace()
Expand Down
3 changes: 3 additions & 0 deletions tests/Interp.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import numpy
import lsst.utils.tests as tests
import lsst.pex.logging as logging
from lsst.log import Log
import lsst.afw.image as afwImage
import lsst.afw.geom as afwGeom
import lsst.afw.display.ds9 as ds9
Expand All @@ -51,6 +52,8 @@
verbose = 0
logging.Trace_setVerbosity("algorithms.Interp", verbose)

Log.getLogger("algorithms.Interp").setLevel(Log.INFO)

try:
type(display)
except NameError:
Expand Down
2 changes: 2 additions & 0 deletions tests/cr.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import lsst.utils.tests as tests
import lsst.pex.config as pexConfig
import lsst.pex.logging as logging
from lsst.log import Log
import lsst.afw.image as afwImage
import lsst.afw.math as afwMath
import lsst.afw.geom as afwGeom
Expand All @@ -52,6 +53,7 @@
except NameError:
verbose = 0
logging.Trace_setVerbosity("algorithms.CR", verbose)
Log.getLogger("algorithms.CR").setLevel(Log.INFO)

try:
type(display)
Expand Down
2 changes: 2 additions & 0 deletions tests/measure.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import lsst.utils
import lsst.utils.tests as tests
import lsst.pex.logging as logging
from lsst.log import Log
import lsst.pex.config as pexConfig
import lsst.afw.detection as afwDetection
import lsst.afw.image as afwImage
Expand All @@ -53,6 +54,7 @@
except NameError:
verbose = 0
logging.Trace_setVerbosity("afwDetection.Measure", verbose)
Log.getLogger("afwDetection.Measure").setLevel(Log.INFO)

try:
type(display)
Expand Down
3 changes: 3 additions & 0 deletions tests/psfIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import lsst.afw.table as afwTable
import lsst.afw.display.ds9 as ds9
import lsst.afw.display.utils as displayUtils
from lsst.log import Log
import lsst.meas.base as measBase
import lsst.meas.algorithms as algorithms

Expand All @@ -60,6 +61,8 @@
verbose = 0
logging.Trace_setVerbosity("algorithms.psf", verbose)

Log.getLogger("algorithms.psf").setLevel(Log.INFO)

psfFileNum = 1
def roundTripPsf(key, psf):
global psfFileNum
Expand Down
3 changes: 3 additions & 0 deletions tests/testDoubleGaussianPsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import lsst.utils.tests as utilsTests
import lsst.pex.exceptions as pexExceptions
import lsst.pex.logging as logging
from lsst.log import Log
import lsst.afw.geom as afwGeom
import lsst.afw.image as afwImage
import lsst.afw.detection as afwDetect
Expand All @@ -28,6 +29,8 @@
verbose = 0
logging.Trace_setVerbosity("algorithms.Interp", verbose)

Log.getLogger("algorithms.Interp").setLevel(Log.INFO)

try:
type(display)
except NameError:
Expand Down
4 changes: 4 additions & 0 deletions tests/testPsfAttributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

import lsst.utils.tests as utilsTests
import lsst.pex.logging as logging
from lsst.log import Log
import lsst.afw.geom as afwGeom
import lsst.afw.display.ds9 as ds9
import lsst.meas.algorithms as measAlg
Expand All @@ -48,6 +49,9 @@
logging.Trace.setVerbosity("afw.detection.Psf", verbose)
display = False

Log.getLogger("meas.algorithms.Interp").setLevel(Log.INFO)
Log.getLogger("afw.detection.Psf").setLevel(Log.INFO)

#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

class PsfAttributesTestCase(unittest.TestCase):
Expand Down
4 changes: 4 additions & 0 deletions tests/testPsfDetermination.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import unittest
import lsst.utils.tests as utilsTests
import lsst.pex.logging as logging
from lsst.log import Log
import lsst.afw.image as afwImage
import lsst.afw.detection as afwDetection
import lsst.afw.geom as afwGeom
Expand All @@ -58,6 +59,9 @@
logging.Trace.setVerbosity("afw.detection.Psf", verbose)
display = False

Log.getLogger("meas.algorithms.Interp").setLevel(Log.INFO)
Log.getLogger("afw.detection.Psf").setLevel(Log.INFO)

#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

def psfVal(ix, iy, x, y, sigma1, sigma2, b):
Expand Down

0 comments on commit d629d81

Please sign in to comment.