autolens.Convolver#

class autolens.Convolver(mask, kernel)[source]#
__init__(mask, kernel)[source]#

Class to setup the 1D convolution of an / mapping matrix.

Take a simple 3x3 and masks:

[[2, 8, 2], [5, 7, 5], [3, 1, 4]]

[[True, False, True], (True means that the value is masked) [False, False, False], [True, False, True]]

A set of values in a corresponding 1d array of this might be represented as:

[2, 8, 2, 5, 7, 5, 3, 1, 4]

and after masking as:

[8, 5, 7, 5, 1]

Setup is required to perform 2D real-space convolution on the masked array. This module finds the relationship between the unmasked 2D data, masked data and kernel, so that 2D real-space convolutions can be efficiently applied to reduced 1D masked structures.

This calculation also accounts for the blurring of light outside of the masked regions which blurs into the masked region.

Methods

__init__(mask, kernel)

Class to setup the 1D convolution of an / mapping matrix.

convolve_image(image, blurring_image)

For a given 1D array and blurring array, convolve the two using this convolver.

convolve_image_no_blurring(image)

For a given 1D array and blurring array, convolve the two using this convolver.

convolve_image_no_blurring_interpolation(image)

For a given 1D array and blurring array, convolve the two using this convolver.

convolve_jit(image_1d_array, …)

convolve_mapping_matrix(mapping_matrix)

For a given inversion mapping matrix, convolve every pixel’s mapped with the PSF kernel.

convolve_matrix_jit(mapping_matrix, …)

convolve_no_blurring_jit(image_1d_array, …)

frame_at_coordinates_jit(coordinates, mask, …)

Returns the frame (indexes of pixels light is blurred into) and kernel_frame (kernel kernel values of those pixels) for a given coordinate in a masks and its PSF.