apply_grav_lens

simcado.source.apply_grav_lens(image, x_cen=0, y_cen=0, r_einstein=None, eccentricity=1, rotation=0)[source]

Apply a singular isothermal ellipsoid (SIE) gravitational lens to an image

Parameters
imagenp.ndarray
x_cen, y_cenfloat

[pixel] centre of the background image relative to the centre of the field of view

r_einsteinfloat

[pixel] Einstein radius of lens. If None, r_einstein = image.shape[0] // 4

eccentricityfloat

[1..0] The ratio of semi-minor to semi-major axis for the lens

rotationfloat

[degrees] Rotation of lens ccw from the x axis

Returns
lensed_imagenp.ndarray