autolens.potential_correction.FitDpsiImaging#

class FitDpsiImaging[source]#

Bases: object

A linear inversion of an image residual for pixelized corrections dpsi to the lensing potential, at fixed source: the residual is modelled as -B D_s D_psi dpsi (PSF blur matrix B, source-gradient matrix D_s, dpsi-gradient operator D_psi), regularized on the dpsi mesh and solved for the maximum-evidence correction.

Parameters:
  • masked_imaging – The masked al.Imaging dataset.

  • image_residual (ndarray) – The 1D (slim) image residual of the smooth-model fit, of shape [n_unmasked_data_pixels].

  • source_gradient (ndarray) – The [n_unmasked_data_pixels, 2] (dS/dy, dS/dx) source gradients at the ray-traced positions of the image pixels.

  • dpsi_pixelization (DpsiPixelization) – The dpsi mesh + regularization model.

  • anchor_points (Optional[ndarray]) – The [3, 2] (y, x) anchor positions of the dpsi rescaling scheme.

  • preloads (Optional[dict]) – Precomputed attributes set directly onto the fit (e.g. the psf_mat shared across evaluations).

Methods

Attributes

curvature_regularization_matrix

data_vector

dpsi_gradient_matrix

dpsi_linear_obj

dpsi_points

dpsi_regularization_matrix

inverse_noise_covariance_matrix

log_evidence

noise normalization, the log-determinants of the curvature+regularization and regularization matrices, the regularization penalty of the solution and the chi-squared of the residual fit.

mapping_matrix

pair_dpsi_data_obj

psf_matrix

rescaled_dpsi

The dpsi solution rescaled by the plane zeroing it at the three anchor points (Suyu et al.'s scheme), plus the (a_y, a_x, c) coefficients.

source_gradient_matrix

property inverse_noise_covariance_matrix#
property psf_matrix#
property source_gradient_matrix#
property pair_dpsi_data_obj#
property dpsi_gradient_matrix#
property dpsi_points#
property dpsi_linear_obj#
property dpsi_regularization_matrix#
property mapping_matrix#
property data_vector#
property curvature_regularization_matrix#
construct_useful_matrices()[source]#
solve_dpsi(return_error=False)[source]#
property log_evidence#

noise normalization, the log-determinants of the curvature+regularization and regularization matrices, the regularization penalty of the solution and the chi-squared of the residual fit.

Type:

The Bayesian evidence of the dpsi inversion

property rescaled_dpsi#

The dpsi solution rescaled by the plane zeroing it at the three anchor points (Suyu et al.’s scheme), plus the (a_y, a_x, c) coefficients. Falls back to the unrescaled solution when no valid anchor points are set.