11import copy
22
33import numpy as np
4- from typing import Dict , List , Optional , Type , Union , TYPE_CHECKING
4+ from typing import Dict , List , Optional , Type , Union
5+
6+ from autoconf import cached_property
57
68from autoarray .dataset .imaging .dataset import Imaging
79from autoarray .dataset .interferometer .dataset import Interferometer
810from autoarray .inversion .inversion .dataset_interface import DatasetInterface
911from autoarray .inversion .linear_obj .linear_obj import LinearObj
10- from autoarray .inversion .linear_obj .func_list import AbstractLinearObjFuncList
1112from autoarray .inversion .pixelization .mappers .abstract import AbstractMapper
1213from autoarray .inversion .regularization .abstract import AbstractRegularization
1314from autoarray .inversion .inversion .settings import SettingsInversion
@@ -409,7 +410,7 @@ def curvature_reg_matrix_reduced(self) -> Optional[np.ndarray]:
409410 # Zero rows and columns in the matrix we want to ignore
410411 return self .curvature_reg_matrix [ids_to_keep ][:, ids_to_keep ]
411412
412- @property
413+ @cached_property
413414 def reconstruction (self ) -> np .ndarray :
414415 """
415416 Solve the linear system [F + reg_coeff*H] S = D -> S = [F + reg_coeff*H]^-1 D given by equation (12)
@@ -436,10 +437,6 @@ def reconstruction(self) -> np.ndarray:
436437 # ids of values which are not zeroed and therefore kept in soluiton, which is computed in preloads.
437438 ids_to_keep = self .preloads .source_pixel_zeroed_indices_to_keep
438439
439- total_linear_light_profiles = self .cls_list_from (
440- cls = AbstractLinearObjFuncList
441- )
442-
443440 # Use advanced indexing to select rows/columns
444441 data_vector = self .data_vector [ids_to_keep ]
445442 curvature_reg_matrix = self .curvature_reg_matrix [ids_to_keep ][
0 commit comments