Skip to content
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

meas_base review for DM-4926: centroids outside Footprints. #43

Merged
merged 3 commits into from Aug 8, 2016

Conversation

TallJimbo
Copy link
Member

No description provided.

@@ -201,6 +201,42 @@ class CentroidTransform : public BaseTransform {
afw::table::CovarianceMatrixKey<ErrElement,2> _coordErrKey;
};

class CentroidChecker {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quibble: this newline is unnecessary.

@TallJimbo
Copy link
Member Author

It wasn't introduced on this issue, but since I've noticed it here, could you fix the "instnace" type in the addFlagHandler docstring? Separate commit, please.


# This is a measure routine which does nothing except to raise Exceptions
# as requested by the caller. Errors normally don't occur unless there is
# something wrong in the inputs, or if there is an error during the measurement
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find "as requested by the caller" a bit confusing here. do you mean "Exceptions caused by moving the true result the amount specified in the config"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is no longer relevant. It was for a previous incarnation.

@pgee2000 pgee2000 force-pushed the tickets/DM-4926 branch 6 times, most recently from 6293fd7 to 48d5d64 Compare August 5, 2016 02:36
pgee2000 and others added 3 commits August 5, 2016 22:39
The CentroidChecker should be used by a Centroid Plugin.
It fixes centroider errors whose result is outside the
footprint.  It must be constructed during __init__,
as it adds a flag_resetToPeak to the subschema of the
centroid plugin.

The centroidChecker(measRecord) should be called after
a plugin stores it measured centroid in its measRecord.
If the centroid found lies outside the footprint, the
result will be "reset" to the footprint peak.

If maxDistFromPeak > 0 in the config of the plugin,
a check and reset is also done for centroids which fall
further than specified from the footprint peak.

When a reset if done, flag and flag_resetToPeak are set.

Unit test for CentroidChecker.py including toy plugin
to simulate errors. Also check that the plugin works
with the base Centroid algorithms.

Naive, Gaussian and SdssCentroid changed to use checker.
I think this is leftover from an older style of setting
flags, which allowed the algorithm to set flags to True,
then throw out from anywhere.

Such failures will now be caught by the framework.
Plus, this strategy would circumvent any other code
(such as the Centroid Checker itself) which might set
a failure flag but allow the plugin to continue on.
@pgee2000 pgee2000 merged commit a2db85c into master Aug 8, 2016
@ktlim ktlim deleted the tickets/DM-4926 branch August 25, 2018 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants