Skip to content

Commit

Permalink
Properly print traceback
Browse files Browse the repository at this point in the history
  • Loading branch information
fred3m committed Sep 8, 2022
1 parent d8057db commit c124ab4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/lsst/meas/extensions/scarlet/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from scarlet.bbox import Box, overlapped_slices
from scarlet.lite import LiteBlend, LiteFactorizedComponent, LiteObservation, LiteSource, LiteParameter
from scarlet.lite.measure import weight_sources
import traceback

from lsst.geom import Box2I, Extent2I, Point2I, Point2D
from lsst.afw.detection.multiband import heavyFootprintToImage
Expand Down Expand Up @@ -518,8 +517,10 @@ def updateBlendRecords(blendData, catalog, modelPsf, observedPsf, redistributeIm
srcId = sourceRecord.getId()
x = peak["i_x"]
y = peak["i_y"]
logger.warn(f"Source {srcId} at {x},{y} could not set the peak flux with error:")
traceback.print_exc()
logger.warning(
f"Source {srcId} at {x},{y} could not set the peak flux with error:",
exc_info=1
)
sourceRecord.set("deblend_peak_instFlux", np.nan)

# Set the metrics columns.
Expand Down

0 comments on commit c124ab4

Please sign in to comment.