Skip to content

Commit c51f76b

Browse files
committed
docstrings
1 parent 01a3aad commit c51f76b

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

autoarray/inversion/inversion/abstract.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,10 +759,47 @@ def log_det_regularization_matrix_term(self) -> float:
759759

760760
@property
761761
def reconstruction_noise_map_with_covariance(self) -> np.ndarray:
762+
"""
763+
Returns the noise-map of the reconstruction as a two dimension matrix which accounts for the covariance
764+
of the noise between pixels.
765+
766+
The diagonal of this matrix is the noise-map of the reconstruction, which can be used for analysing the
767+
reconstruction with noise properties that are representative of the fit and therefore should be used
768+
for any scientific analysis (e.g. source reconstructions of strong lenses).
769+
770+
This noise-map is defined as the RMS standard deviation of the noise in every pixel of the reconstruction.
771+
This definition is identical to the `noise_map` attributes of dataset objects.
772+
773+
It is computed as the square root of the inverse of the curvature matrix with regularization, which is the
774+
same matrix used to solve for the reconstruction via the linear inversion.
775+
776+
Returns
777+
-------
778+
The noise-map of the reconstruction as a two dimension matrix which accounts for the covariance of the noise
779+
between pixels.
780+
"""
762781
return np.sqrt(np.linalg.inv(self.curvature_reg_matrix))
763782

764783
@property
765784
def reconstruction_noise_map(self):
785+
"""
786+
Returns the noise-map of the reconstruction as a one dimensional ndarray, which does not account for the
787+
covariance of the noise between pixels.
788+
789+
This matrix is representative of the noise properties of the fit and should be used for any scientific
790+
analysis (e.g. source reconstructions of strong lenses).
791+
792+
The noise-map of the reconstruction is the RMS standard deviation of the noise in every pixel of the
793+
reconstruction. This definition is identical to the `noise_map` attributes of dataset objects.
794+
795+
It is computed as the square root of the diagonal of the `reconstruction_noise_map_with_covariance` matrix,
796+
which is the same matrix used to solve for the reconstruction via the linear inversion.
797+
798+
Returns
799+
-------
800+
The noise-map of the reconstruction as a one dimensional ndarray, which does not account for the covariance
801+
of the noise between pixels.
802+
"""
766803
return np.diagonal(self.reconstruction_noise_map_with_covariance)
767804

768805
@property

0 commit comments

Comments
 (0)