Open b-remy opened 2 years ago
The difference between the above two plots is pretty low. But in practice I use the gradients of this transform. When I run a gradient descent to get e1 and e2 I get the following errors:
using ResamplingType.BILINEAR
using bernsteinquitic
Two questions on that:
ping @Dr-Zero
- In galsim, do you use the quintic interpolation or do you use the default (lanczos) one?
I use the default one, so lanczos I guess. Do you know how to use quintinc in galsim @andrevitorelli ?
- What are you comparing the gradients to? I mean, if you apply autograd(f) vs numdiff(f), it's not clear to me that autograd(f) - numdiff(f) being a bit larger or smaller mean that the interpolation contained in f is better or worse...
Here I don't compare autodiff to numdiff. On the first plot I am just comparing the forward shear operation between galsim and galflow. On the second plot I just run a gradient descent on the shear parameters to fit the observation. Both profile have the same sersic index, radius and flux.
I use the default one, so lanczos I guess. Do you know how to use quintinc in galsim @andrevitorelli ?
I don't know how to configure it galsim to use it globally. I tested with ngmix, where you can define it more easily (I think there are about 2 or 3 places where ngmix defines the interpolator, and changing that takes care of it all).
I'll think a bit about the second question before replying.
I was running inference algorithm using the shear transformation with the new interpolation kernel and I had weird results. So I checked only this shear operation of a sersic profile and found worse result when using the
bernsteinquitic
of our custom addons than when using the standardResamplingType.BILINEAR
...Here I start from a round sersic profile and compare the shearing between galsim and galflow:
ResamplingType.BILINEAR
bernsteinquitic
Isn't supposed to be the opposite?