Skip to content

Commit

Permalink
Merge pull request #57 from lsst/tickets/DM-35530
Browse files Browse the repository at this point in the history
DM-35530: Fix typo in persisted scarlet model data
  • Loading branch information
fred3m committed Jul 12, 2022
2 parents acb0082 + a90aef4 commit 9630dc6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/lsst/meas/extensions/scarlet/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ class ScarletFactorizedComponentData:
extent : `tuple` of `int`
The `(width, height)` of the component array.
center : `tuple` of `int`
The center of the component.
The ``(x, y)`` center of the component.
Note: once this is converted into a scarlet `LiteBlend` the source has
the traditional c++ `(y, x)` ordering.
sed : `numpy.ndarray`
The SED of the component.
morph : `numpy.ndarray`
Expand All @@ -130,7 +132,7 @@ def asDict(self) -> dict:
return {
"xy0": self.xy0,
"extent": self.extent,
"center": self.extent,
"center": self.center,
"sed": tuple(self.sed.astype(float)),
"morph": tuple(self.morph.flatten().astype(float))
}
Expand Down
3 changes: 3 additions & 0 deletions tests/test_deblend.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ def test_deblend_task(self):

# Get the scarlet model for the source
source = [src for src in blend.sources if src.recordId == child.getId()][0]
parentBox = catalog.find(child["parent"]).getFootprint().getBBox()
self.assertEqual(source.center[1], px - parentBox.getMinX())
self.assertEqual(source.center[0], py - parentBox.getMinY())

if useFlux:
# Get the flux re-weighted model and test against
Expand Down

0 comments on commit 9630dc6

Please sign in to comment.