slitronomy.Lensing package

Submodules

slitronomy.Lensing.lensing_operator module

class slitronomy.Lensing.lensing_operator.LensingOperator(lens_model_class, image_grid_class, source_grid_class, num_pix, lens_light_mask=None, minimal_source_plane=False, min_num_pix_source=10, use_mask_for_minimal_source_plane=True, source_interpolation='bilinear', verbose=False)

Bases: object

Defines the mapping of pixelated light profiles between image and source planes

delete_cache()
get_lens_mapping(original_source_grid)
image2source(image_1d, kwargs_lens=None, kwargs_special=None, update_mapping=False, no_flux_norm=False, original_source_grid=False)

if no_flux_norm is True, do not normalize light flux to better visualize the mapping

image2source_2d(image, **kwargs)
image_plane_coordinates
magnification_map(kwargs_lens)
pixel_area_ratio

source pixel area divide by image pixel area

set_likelihood_mask(mask)
source2image(source_1d, kwargs_lens=None, kwargs_special=None, update_mapping=False, original_source_grid=False)
source2image_2d(source, **kwargs)
source_plane_coordinates
source_subgrid_resolution
update_mapping(kwargs_lens, kwargs_special=None)

slitronomy.Lensing.lensing_plane module

class slitronomy.Lensing.lensing_plane.PlaneGrid(grid_class)

Bases: object

Base class for image and source plane grids, designed for pixelated lensing operator.

delta_pix
grid(two_dim=False)
grid_pixels(two_dim=False)
grid_shape
grid_size
num_pix
subgrid_resolution
theta_x
theta_y
unit_image
class slitronomy.Lensing.lensing_plane.SizeablePlaneGrid(grid_class, verbose=False)

Bases: slitronomy.Lensing.lensing_plane.PlaneGrid

Class that defines the typical grid on which source galaxy is projected, whose size can be adapted with respect to image masks projected by a LensingOperator.

add_delensed_masks(mapped_image, mapped_mask=None)

input mapped_image and mask must be non-boolean 2d arrays

compute_resized_grid(min_num_pix)
effective_mask

Returns the intersection between the likelihood mask and the area on source plane that has corresponding pixels in image plane

num_pix
project_on_original_grid(image)
static shrink_plane_iterative(effective_mask, min_num_pix=10)
Parameters:min_num_pix – minimal allowed number of pixels in source plane
state
switch_resize(switch_bool)
theta_x
theta_y

Module contents