moustakas / legacyhalos

Code and papers for a multi-faceted study of the baryonic content of dark matter halos in Legacy Survey imaging.
MIT License
4 stars 7 forks source link

do not allow the ellipse centroid to move far from the center #71

Closed moustakas closed 5 years ago

moustakas commented 5 years ago

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 perhaps legacyhalos.io.read_multiband), explicitly check that the centroid hasn't moved too far from the center of the mosaic / cutout.

moustakas commented 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

moustakas commented 5 years ago

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.