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-30829: Add persistence for WarpedPsf #245
Conversation
I assumed the file was previously current through 2019, but that all new 2020-2021 entries are valid.
f2786d1
to
29b5596
Compare
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.
LGTM. Just a couple formatting questions.
tests/test_warpedPsf.cc
Outdated
@@ -247,24 +309,23 @@ BOOST_AUTO_TEST_CASE(warpedPsf) | |||
unwarped_psf->evalABC(a, b, c, q); | |||
|
|||
Eigen::Matrix2d m0; | |||
m0 << a, b, | |||
b, c; | |||
m0 << a, b, b, c; |
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.
I assume this is to make clang-format happy? Is there a way to do that and keep it obvious that these are entries in a 2x2 matrix like before?
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.
Sorry, I just blindly ran clang-format
. Since I'm not familiar enough with Eigen to know if there's another way to write this, I'll just revert.
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.
Aha, there's a workaround: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#disabling-formatting-on-a-piece-of-code
This included updating the copyright statement, removing PTR and CONST_PTR, and running clang-format. Some lines dealing with coefficients and matrices have been excluded from clang-format, to let them use formatting that implies a 2D state.
This is consistent with the intent of the class (a classic decorator pattern) and avoids the need to specialize ImagePsfTrampoline for WarpedPsf.
29b5596
to
554f0a7
Compare
This PR implements persistence for
WarpedPsf
. The adopted persisted form is merely the concatenation of the three subobjects currently making up theWarpedPsf
implementation, as I don't see a more generic way to represent that state. Depends on lsst/afw#597.