-
Notifications
You must be signed in to change notification settings - Fork 1
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
Comparison to NGMIX #17
Comments
That looks like a nice dipole in the e2-direction. What do you get for 2p / 2m ? |
The key thing is that we don't yet have the proper tools to deal with off-grid pixel centers, which happen when we use even size images. This is in relation to DifferentiableUniverseInitiative/GalFlow#8 that @b-remy will look into. Another aspect to this is that we do need the higher order interpolation tools mentioned in DifferentiableUniverseInitiative/GalFlow#10 In the meantime, being very careful with the size of our FFTs and such, I think we can get pretty close to ngmix. I'll update the demo notebook comparing to ngmix before I forget all the steps needed ^^' |
@andrevitorelli let me know if the demo notebook now makes sense to you: https://github.com/CosmoStat/autometacal/blob/main/notebooks/NgmixComparison.ipynb You will notice I went back to the basics, doing everything in terms of simple FFT operations, and use odd size images, but I think this is a nice baseline to use for now, until we have more general purpose GalFlow tools. Note that here we have everything to actually start from the postage stamps themselves, I'm not using GalSim at all to draw kspace image or to do any deconvolution. Let me know if you have any questions about this notebook, or would like me to add anything else. |
I added a notebook to look at how we do compared to NGMIX. What I'm doing is that I'm making some observations with the ngmix example code, then run metacal on these obs. The input obs give me the input image and PSF, and with the output metacal obs, I have access to the reconvolution PSF.
So, the good news is that the noshear variant seems to be pretty ok:
The bad news is that I'm seeing some non zero residuals in the sheared variants:
This doesn't go away easily.... I'm thinking the only part of the code that can introduce these errors is the shearing (given that noshear is ok), and there... I know from experiments with galsim that it may come down to the interpolation method in Fourier space. Unfortunately we only have access to a linear interpolant. When using kspace linear interpolation in galsim and galflow we get close to numerical precision:
but when GalSim uses the quintic interpolant, the errors are several orders of magnitude larger...
So, here is the question... is our linear interpolant a deal breaker here? (in which case we'll need to implement ourselves a different interpolation method) or for the purpose of demonstrating the idea, is linear interpolation good enough for now?
Also, still a possibility that the problem can come from elsewhere....
The text was updated successfully, but these errors were encountered: