autoarray.inversion.regularization.ConstantSplit#

class ConstantSplit[source]#

Bases: Constant

A constant regularization scheme which splits every source pixel into a cross of four regularization points (regularization is described in the Regularization class above) and interpolates to these points in order to apply smoothing on the solution of an Inversion.

The size of this cross is determined via the size of the source-pixel, for example if the source pixel is a Voronoi pixel the area of the pixel is computed and the distance of each point of the cross is given by the area times 0.5.

For this regularization scheme, there is only 1 regularization coefficient that is applied to all neighboring pixels. This means that the matrix B only needs to regularize pixels in one direction (e.g. pixel 0 regularizes pixel 1, but NOT visa versa). For example:

B = [-1, 1] [0->1]

[0, -1] 1 does not regularization with 0

Note that for this scheme the indexes of entries in the regularization matrix are not the source pixel indexes but the indexes of each source pixel index cross.

A small numerical value of 1.0e-8 is added to all elements in constant regularization matrix, to ensure that it is positive definite.

Parameters

coefficient (float) – The regularization coefficient which controls the degree of smooth of the inversion reconstruction.

Methods

regularization_matrix_from

Returns the regularization matrix of this regularization scheme.

regularization_weights_from

Returns the regularization weights of this regularization scheme.

regularization_matrix_from(linear_obj)[source]#

Returns the regularization matrix of this regularization scheme.

Parameters

linear_obj (LinearObj) – The linear object (e.g. a Mapper) which uses this matrix to perform regularization.

Return type

The regularization matrix.