sweverett / Balrog-GalSim

Modules for GalSim that will be useful for DES images in conjunction with Balrog.
MIT License
5 stars 5 forks source link

Fix rendering failures with cm_T clipping & `gmix` consistency #58

Closed sweverett closed 5 years ago

sweverett commented 5 years ago

A small fraction of ngmix objects (<1%) will have postage-stamp rendering failures due to 0 size assignment to the Dev component Gaussians: image GalSim can't handle this, so we previously skipped these Gaussian modes. However this is incorrect as these zero-sized Gaussians still contain small values of flux. We can fix this by clipping the sizes to a small, finite value similar to what Erin implemented here in an update to gmix.make_galsim_object().

We know that the default value of the clipping (T=0.001) is too small as we see a residual when comparing Balrog renderings to the ngmix renderings for objects w/ fracdev>0: image To make everything consistent, we should (1) find a better default value of T-clipping that doesn't lead to statistically significant residuals, (2) update make_galsim_object() to correctly use the clipping (as it doesn't avoid the rendering failures yet, due to a bug), and (3) add the passing of gsparams to make_galsim_object() so we we can use the gmix method directly and avoid these kinds of consistency issues.

sweverett commented 5 years ago

This has been largely solved by this PR to ngmix.

Will now remove BalGMixCM from ngmixCatalog so we only have one code source.