Closed moustakas closed 5 years ago
Temporary bandaid implemented in https://github.com/moustakas/legacyhalos/commit/5eda183e8d11f9eaf997d638fae9e2efba6a094f. Basically if the peak centroid moves more than 5 pixels in either dimension then move it back to the center of the mosaic.
Here's an example of where this breaks down-- http://portal.nersc.gov/project/cosmo/temp/ioannis/legacyhalos-html/8/0/72/0000316-045005457/0000316-045005457.html
The solution implemented in #74 is good enough for now, I think. The underlying issue is due to unmodeled galaxies in the field, which is really a different problem.
In some cases, e.g., when there's a brightish star on the edge of the field, the moment-based (i.e., non-parameteric) galaxy centroiding procedure can pick up this secondary peak, which creates all sorts of downstream problems.
ToDo: in
legacyhalos.ellipse
(and also perhapslegacyhalos.io.read_multiband
), explicitly check that the centroid hasn't moved too far from the center of the mosaic / cutout.