glenco / SLsimLib

Library for Gravitational Lensing Simulations
MIT License
2 stars 1 forks source link

Lensing Potential #153

Open rbmetcalf opened 4 years ago

rbmetcalf commented 4 years ago

The reason I didn't put the potential as an option is because when there a are multiple planes the deflection field is not a potential field. This makes it ambiguous what is meant by the potential in the general case.

If you wish to find the lensing potential, i.e. the potential whose gradient is the deflection for a single plane lens you need to output the time-delay (LensingVariable = DT) which is in units of years.  You then need to subtract the deflection angle.

PixelMap dt = gridmap.writePixelMapUniform(DT);
PixelMap alpha = gridmap.writePixelMapUniform(ALPHA);
PixelMap phi = alpha*alpha * 0.5 - dt *c* d_ls /(d_s*d_l)

where c is in Mpc/yr and d ins the comoving angular size distance.