Closed EiffL closed 3 years ago
I don't understand what the remaining residuals are.
Ah good question, well this is what I explored a little bit here https://github.com/CosmoStat/autometacal/issues/17#issuecomment-866377670 where I showed how the residuals look if we have access to cubic interpolation in Fourier space. Once we finish the interpolant issue in GalFlow most of these residuals go away.
Beyond just the interpolant galsim would also use zero padding and possibly also subsampling, which we will be able to do correctly once we finish the FFT issue in GalFlow.
This small PR is proposing the refactoring we talked about, to have a nicer API, and still being able to reproduce NGMIX sheared images under the condition of odd size images (and with the caveats that we are still using simplistic kspace operations).
The API to get a metacal version of an image becomes:
where all entries here are batched, so we can compute the metacal response for a batch of images at once.
Also added simple test against ngmix, with visualisation notebook here.
![image](https://user-images.githubusercontent.com/861591/123340914-59292980-d54d-11eb-8b5a-8c33eb966089.png)
This PR will close #17 as it concludes this comparison against ngmix at the image level (at least for now).