CosmoStat / shapepipe

Shape Measurement Pipeline
MIT License
17 stars 13 forks source link

[NEW FEATURE] Ubersegmentation map #602

Open lbaumo opened 1 year ago

lbaumo commented 1 year ago

The sextractor segmaps have problems with shear bias in the direction of neighbors in blended galaxies. From Jarvis 2016: tests revealed significant biases from the masking procedure we had been using, involving just the SEXTRACTOR segmentation maps. When a galaxy had a bright neighbor on the same postage stamp, light from the neighbor that was just outside the segmentation map was being included as part of the fit, thus significantly biasing the inferred shapes in the direction of the neighbor.

how to implement uberseg (again from Jarvis 2016)

  1. start with the SEXTRACTOR segmentation map from the coadd image,
  2. map it on to the corresponding pixels of the single-epoch images.
  3. set pixels in the weight map to zero if they were either associated with other objects in the segmentation map or were closer to any other object than to the object of interest. Screen Shot 2022-12-12 at 11 52 29 AM
lbaumo commented 1 year ago

Here is Erin Sheldon's code that creates the ubersegmentation map

step 2 above: _interpolate_coadd_seg_image Interpolates the coadd segmentation map onto the SE image frame.

step 3: get_uberseg will zero out pixels not nearest to central object. there is an option to use a "fast" c code here. This returns a weight map postage stamp with neighbors masked.

lbaumo commented 1 year ago

Where does this belong? basically we are changing the flagged images. This could either go in the vignet section, since the bookkeeping will be similar, or in the ngmix section, where the flags will be used. Maybe it should be it's own module, though that seems like a lot of overhead.

martinkilbinger commented 1 year ago

My preference would be either in the vignet or own module. In that way übersegmentation can be used with other shape measurement methods, if we implement others than ngmix.