Skip to content

Commit

Permalink
Merge pull request #199 from lsst/tickets/DM-31801
Browse files Browse the repository at this point in the history
DM-31801: Use lsst prefix for logger names
  • Loading branch information
timj committed Nov 11, 2021
2 parents 9ca8fab + 549b55f commit 6ef2636
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/lsst/ip/isr/calibType.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def __init__(self, camera=None, detector=None, log=None, **kwargs):
"_detectorName", "_detectorSerial", "_detectorId",
"_filter", "_calibId", "_metadata"])

self.log = log if log else logging.getLogger(__name__.partition(".")[2])
self.log = log if log else logging.getLogger(__name__)

if detector:
self.fromDetector(detector)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_linearize.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def setUp(self):
# Spline coefficients: should match a 1e-6 Squared solution
self.splineCoeffs = np.array([-100, 0.0, 1000, 2000, 3000, 4000, 5000,
0.0, 0.0, 1.0, 4.0, 9.0, 16.0, 25.0])
self.log = logging.getLogger("ip.isr.testLinearizer")
self.log = logging.getLogger("lsst.ip.isr.testLinearizer")

def tearDown(self):
# destroy LSST objects so memory test passes.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_linearizeLookupTable.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def testBasics(self):
inImage = makeRampImage(bbox=self.bbox, start=-5, stop=250, imageClass=imageClass)
table = self.makeTable(inImage)

log = logging.getLogger("ip.isr.LinearizeLookupTable")
log = logging.getLogger("lsst.ip.isr.LinearizeLookupTable")

measImage = inImage.Factory(inImage, True)
llt = Linearizer(table=table, detector=self.detector)
Expand All @@ -96,7 +96,7 @@ def testBasics(self):
self.assertImagesAlmostEqual(refImage, measImage)

# make sure logging is accepted
log = logging.getLogger("ip.isr.LinearizeLookupTable")
log = logging.getLogger("lsst.ip.isr.LinearizeLookupTable")
linRes = llt.applyLinearity(image=measImage, detector=self.detector, log=log)

def testErrorHandling(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_linearizeSquared.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def testBasics(self):
self.assertImagesAlmostEqual(refImage, measImage)

# make sure logging is accepted
log = logging.getLogger("ip.isr.LinearizeSquared")
log = logging.getLogger("lsst.ip.isr.LinearizeSquared")
linRes = linCorr.applyLinearity(image=measImage, detector=self.detector, log=log)

def testKnown(self):
Expand Down

0 comments on commit 6ef2636

Please sign in to comment.