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-44029: Deprecate NaiveDipoleCentroid and NaiveDipoleFlux #313
Conversation
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! One major request is to not rename the field. There's also a reference to this algorithm in DipoleMeasurementTask.rst under the doc/
directory. That should also be marked for removal in DM-44030.
@@ -208,7 +208,9 @@ inline DipoleFluxAlgorithm::DipoleFluxAlgorithm( | |||
class that knows how to calculate centroids as a simple unweighted first | |||
* moment of the 3x3 region around the peaks | |||
*/ | |||
class NaiveDipoleFlux : public DipoleFluxAlgorithm { | |||
class [[deprecated( | |||
"This algorithm is deprecated and will be removed after v27.")]] |
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.
Could you include the names of the algorithms in the deprecation warnings?
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.
That comes "for free" with the compiler warning that is emitted when you try to use the class.
_posCentroid = meas::base::CentroidResultKey(schema[name+"_pos_centroid"]); | ||
_negCentroid = meas::base::CentroidResultKey(schema[name+"_neg_centroid"]); | ||
_avgCentroid = meas::base::CentroidResultKey(schema[name+"_centroid"]); |
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.
Removing the suffixes seem like it could break other codes, or user scripts. For something that's going to be removed soon, is it necessary? At the very least, it should be on its own separate commit.
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.
Unfortunately, if I don't change it some existing tests (that use DipoleMeasurementTask, which are only used in tests now and one of the things I'd like to deprecate in the future) will fail because they set ip_diffim_PsfDipoleFlux
as the centroid slot, and the centroid slot requires that "name_x"/"name_y" be the centroid fields, not "name_centroid_x".
Nothing in the stack has used these values for a long time, so I think we're ok.
I did move them to a separate commit, though.
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.
Alright, then!
@@ -158,6 +161,9 @@ void wrapDipoleAlgorithms(lsst::cpputils::python::WrapperCollection &wrappers) { | |||
declarePsfDipoleFlux(wrappers); | |||
} | |||
|
|||
// Remove these pragmas on DM-44030 | |||
#pragma GCC diagnostic pop | |||
|
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.
Could you add a comment on what these pragma
s are doing?
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.
They're from the C++ deprecation docs: https://developer.lsst.io/stack/deprecating-interfaces.html#c-deprecation
Change PsfDipoleFlux algorithm to not postfix `_centroid` for positions, so that it behaves properly with the slot system.
6d8dfb1
to
3ae023f
Compare
3ae023f
to
e94c68f
Compare
No description provided.