sie_grad

simcado.source.sie_grad(x, y, par)[source]

Compute the deflection of an SIE (singular isothermal ellipsoid) potential

Parameters
x, ymeshgrid arrays

vectors or images of coordinates; should be matching numpy ndarrays

parlist

vector of parameters with 1 to 5 elements, defined as follows: par[0]: lens strength, or ‘Einstein radius’ par[1]: (optional) x-center (default = 0.0) par[2]: (optional) y-center (default = 0.0) par[3]: (optional) axis ratio (default=1.0) par[4]: (optional) major axis Position Angle

in degrees c.c.w. of x axis. (default = 0.0)

Returns
xg, yggradients at the positions (x, y)

Notes

This routine implements an ‘intermediate-axis’ convention.
Analytic forms for the SIE potential can be found in:

Kassiola & Kovner 1993, ApJ, 417, 450 Kormann et al. 1994, A&A, 284, 285 Keeton & Kochanek 1998, ApJ, 495, 157

The parameter-order convention in this routine differs from that of a previous IDL routine of the same name by ASB.