-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-6999: Logging framework migration #9
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,7 +207,7 @@ def addSchemaKeys(self, schema): | |
'deblend_hasStrayFlux', type='Flag', | ||
doc=('This source was assigned some stray flux')) | ||
|
||
self.log.logdebug('Added keys to schema: %s' % ", ".join(str(x) for x in ( | ||
self.log.trace('Added keys to schema: %s', ", ".join(str(x) for x in ( | ||
self.nChildKey, self.psfKey, self.psfCenterKey, self.psfFluxKey, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the change in level from debug to trace? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was discussed previously here (and noted in the commit message). For this logger named "meas_deblender.baseline", two tracing levels are currently used in master: a less verbose |
||
self.tooManyPeaksKey, self.tooBigKey))) | ||
|
||
|
@@ -250,7 +250,7 @@ def deblend(self, exposure, srcs, psf): | |
statsCtrl.setAndMask(mi.getMask().getPlaneBitMask(self.config.maskPlanes)) | ||
stats = afwMath.makeStatistics(mi.getVariance(), mi.getMask(), afwMath.MEDIAN, statsCtrl) | ||
sigma1 = math.sqrt(stats.getValue(afwMath.MEDIAN)) | ||
self.log.logdebug('sigma1: %g' % sigma1) | ||
self.log.trace('sigma1: %g', sigma1) | ||
|
||
n0 = len(srcs) | ||
nparents = 0 | ||
|
@@ -270,19 +270,19 @@ def deblend(self, exposure, srcs, psf): | |
if self.isLargeFootprint(fp): | ||
src.set(self.tooBigKey, True) | ||
self.skipParent(src, mi.getMask()) | ||
self.log.logdebug('Parent %i: skipping large footprint' % (int(src.getId()),)) | ||
self.log.trace('Parent %i: skipping large footprint', int(src.getId())) | ||
continue | ||
if self.isMasked(fp, exposure.getMaskedImage().getMask()): | ||
src.set(self.maskedKey, True) | ||
self.skipParent(src, mi.getMask()) | ||
self.log.logdebug('Parent %i: skipping masked footprint' % (int(src.getId()),)) | ||
self.log.trace('Parent %i: skipping masked footprint', int(src.getId())) | ||
continue | ||
|
||
nparents += 1 | ||
bb = fp.getBBox() | ||
psf_fwhm = self._getPsfFwhm(psf, bb) | ||
|
||
self.log.logdebug('Parent %i: deblending %i peaks' % (int(src.getId()), len(pks))) | ||
self.log.trace('Parent %i: deblending %i peaks', int(src.getId()), len(pks)) | ||
|
||
self.preSingleDeblendHook(exposure, srcs, i, fp, psf, psf_fwhm, sigma1) | ||
npre = len(srcs) | ||
|
@@ -328,8 +328,8 @@ def deblend(self, exposure, srcs, psf): | |
# Don't care | ||
continue | ||
# We need to preserve the peak: make sure we have enough info to create a minimal child src | ||
self.log.logdebug("Peak at (%i,%i) failed. Using minimal default info for child." % | ||
(pks[j].getIx(), pks[j].getIy())) | ||
self.log.trace("Peak at (%i,%i) failed. Using minimal default info for child.", | ||
pks[j].getIx(), pks[j].getIy()) | ||
if heavy is None: | ||
# copy the full footprint and strip out extra peaks | ||
foot = afwDet.Footprint(src.getFootprint()) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
setupRequired(afw) | ||
setupRequired(log) | ||
setupRequired(meas_algorithms) | ||
setupRequired(numpy) | ||
setupRequired(scons) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the change in level from debug to trace (here and above on line 276:
Log.TRACE
)