GalSim icon indicating copy to clipboard operation
GalSim copied to clipboard

Centroid shifts from lensing

Open rmjarvis opened this issue 10 years ago • 6 comments

In addition to shear and convergence/magnification, lensing also moves the positions of objects around. We should have our lensing modules also be able to return a shift that is appropriate for the location of the galaxy. Then the user could apply that as well as the shear and magnification to get the complete lensing effect.

rmjarvis avatar May 29 '14 03:05 rmjarvis

Shifts like in this paper? http://arxiv.org/pdf/1405.1432.pdf :)

reikonakajima avatar May 29 '14 10:05 reikonakajima

I can implement the deflection angles for the NFW halo, so that one gets the new positions by iteratively searching for the observed positions given the pre-lensing positions.

pmelchior avatar Jun 26 '14 04:06 pmelchior

What would that look like in terms of how the user interacts with the code? Right now they have to enter post-lensing positions. Is the idea that they would now be told to enter pre-lensing positions, which get shifted and the appropriate shear/magnifications applied?

rmandelb avatar Jul 02 '14 09:07 rmandelb

I think there are two ways about that:

  1. We stick to post-lensing positions, then a new method, say getPosition() would return their pre-lensing positions. That's the easiest way, but not really useful because it doesn't solve the problem that the post-lensing positions do not reflect that presence of a halo (or any sort of matter distribution).
  2. We change to pre-lensing positions, then a new wrapper method would compute the post-lensing ones and call the existing shear/convergence methods with it. A second function call to getPosition() would return these coordinates. That's the right way of doing it, but it is costly computationally since there's an iterative solver involved for each (x/y) transformation.

pmelchior avatar Jul 02 '14 15:07 pmelchior

I favor the latter option. The typical use case in which one would care about these shifts is to have a uniform density of objects in the pre-lensing plane, and then want them plotted in the correctly lensed positions. So even though it is more work on our part, I think it's what the user will expect.

As for the UI, I propose the following:

getLensedPositions(prelensing_positions) # New function
getPreLensedPositions(lensed_positions) # New function
getShear(..., prelensed_positions=False) # New kwarg with default = current behavior
... likewise for getConvergence, etc.

rmjarvis avatar Jul 02 '14 16:07 rmjarvis

So even though it is more work on our part, I think it's what the user will expect.

+1.

rmandelb avatar Jul 02 '14 18:07 rmandelb