Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of metacal function + test against NGMIX #19

Merged
merged 2 commits into from
Jun 25, 2021

Conversation

EiffL
Copy link
Member

@EiffL EiffL commented Jun 24, 2021

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:

import autometacal as autocal

mcal_image = autocal.generate_mcal_image(im, psf, rpsf, g)

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
image
image

This PR will close #17 as it concludes this comparison against ngmix at the image level (at least for now).

@andrevitorelli
Copy link
Member

I don't understand what the remaining residuals are.

@EiffL
Copy link
Member Author

EiffL commented Jun 25, 2021

Ah good question, well this is what I explored a little bit here #17 (comment)
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.

Copy link
Member

@andrevitorelli andrevitorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything works ok here! I want it to use it right away for the auto/finite comparisons! :)

@EiffL EiffL merged commit c98cd37 into main Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comparison to NGMIX
2 participants