Skip to content

Commit

Permalink
Remove all lsst.log usage
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Oct 8, 2021
1 parent f87e530 commit f284251
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions python/lsst/cp/pipe/ptc/astierCovPtcFit.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import copy
from scipy.signal import fftconvolve
from scipy.optimize import leastsq
from .astierCovFitParameters import FitParameters
import logging

import lsst.log as lsstLog
from .astierCovFitParameters import FitParameters

__all__ = ["CovFit"]

Expand Down Expand Up @@ -186,7 +186,7 @@ def __init__(self, meanSignals, covariances, covsSqrtWeights, maxRangeFromTuple=
# make it nan safe, replacing nan's with 0 in weights
self.sqrtW = np.nan_to_num(covsSqrtWeights)[meanSignalsMask]
self.r = maxRangeFromTuple
self.logger = lsstLog.Log.getDefaultLogger()
self.logger = logging.getLogger(__name__)

def copy(self):
"""Make a copy of params"""
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/cp/pipe/ptc/photodiode.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def getBOTphotodiodeData(dataRef, dataPath='/project/shared/BOT/_parent/raw/phot
dataPath : `str`, optional
Path at which to find the corresponding photodiode data files.
logger : `lsst.log.Log`, optional
logger : `logging.Logger`, optional
Logger for logging warnings.
Expand Down
8 changes: 4 additions & 4 deletions python/lsst/cp/pipe/ptc/plotPtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

__all__ = ['PlotPhotonTransferCurveTask']

import logging
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
Expand All @@ -36,7 +37,6 @@
from matplotlib.ticker import MaxNLocator
from lsst.cp.pipe.ptc.astierCovPtcUtils import getFitDataFromCovariances
from lsst.ip.isr import PhotonTransferCurveDataset
import lsst.log as lsstLog


class PlotPhotonTransferCurveTask():
Expand Down Expand Up @@ -108,7 +108,7 @@ def runDataRef(self):
linearizer = isr.linearize.Linearizer.readFits(self.linearizerFileName)
else:
linearizer = None
self.run(filenameFull, datasetPtc, linearizer=linearizer, log=lsstLog)
self.run(filenameFull, datasetPtc, linearizer=linearizer, log=logging.getLogger(__name__))

return

Expand Down Expand Up @@ -146,7 +146,7 @@ def covAstierMakeAllPlots(self, dataset, pdfPages,
pdfPages : `matplotlib.backends.backend_pdf.PdfPages`
PDF file where the plots will be saved.
log : `lsst.log.Log`, optional
log : `logging.Logger`, optional
Logger to handle messages
"""
mu = dataset.finalMeans
Expand Down Expand Up @@ -465,7 +465,7 @@ def plotNormalizedCovariances(self, i, j, inputMu, covs, covsModel, covsWeights,
Plot the top plot with the covariances, and the bottom
plot with the model residuals?
log : `lsst.log.Log`, optional
log : `logging.Logger`, optional
Logger to handle messages.
"""
if not topPlot:
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/cp/pipe/ptc/plotPtcGen2.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def covAstierMakeAllPlots(self, dataset, pdfPages,
pdfPages : `matplotlib.backends.backend_pdf.PdfPages`
PDF file where the plots will be saved.
log : `lsst.log.Log`, optional
log : `logging.Logger`, optional
Logger to handle messages
"""
mu = dataset.finalMeans
Expand Down Expand Up @@ -498,7 +498,7 @@ def plotNormalizedCovariances(self, i, j, inputMu, covs, covsModel, covsWeights,
Plot the top plot with the covariances, and the bottom
plot with the model residuals?
log : `lsst.log.Log`, optional
log : `logging.Logger`, optional
Logger to handle messages.
"""
if not topPlot:
Expand Down

0 comments on commit f284251

Please sign in to comment.