opened
mirca
username_0
Geert (@username_1) carried out an investigation which revealed a critical bug in `muchbettermoments`, see https://github.com/KeplerGO/lightkurve/pull/544.

I would recommend replacing calls from ``muchbettermoments`` with the equivalent ones provided by ``lightkurve``.
bug in muchbettermoments
issue
created
barentsen
username_1
Over in KeplerGO/lightkurve#544, I have exposed the corrected function as  `lightkurve.utils.centroid_quadratic`, which should be a plug-in replacement for `muchbettermoments.quadratic_2d`.
comment
created
barentsen
username_1
(I called it `centroid_quadratic` to make it consistent with the names being used in `photutils.centroids`, which is where this should probably end up if we think it works well!)
comment
created
benmontet
username_2
Thank you both! We will incorporate this improved function in, and I
enjoyed reading through the linear algebra in the lightkurve issues. -B
comment
created
barentsen
username_1
The Lightkurve PR was merged, so you can now try or copy `lightkurve.utils.centroid_quadratic` from Lightkurve/master.

Three things worth nothing:
* While I believe the results returned by `muchbettermoments.quadratic_2d` are wrong, its output does correlate strongly with the true centroids, so it would have been perfectly fine to use its output as regressors for modeling systematics most of the time.
* The only exception to the above is a case where the brightest pixel of a source flips back and forth between two different pixels, in which case `muchbettermoments.quadratic_2d` appeared to produce wild/incorrect jumps.
* If I take synthetic data for an isolated star, I find that traditional centroid moments seem to recover the star's true position more accurately than the quadratic centroids, however I didn't do a proper study.
comment
created
benmontet
username_2
This is now merged and working well; eleanor 1.0.0 uses lightkurve.utils.centroid_quadratic and has no muchbettermoments dependencies. Thank you both!
comment
closed
benmontet
username_2
issue
created
mirca
username_0
Thanks Ben!
comment
created
barentsen
username_1
👍
comment