@@ -53,44 +53,6 @@ def __init__(
5353 xp = xp ,
5454 )
5555
56- @property
57- def _data_vector_mapper (self ) -> np .ndarray :
58- """
59- Returns the `data_vector` of all mappers, a 1D vector whose values are solved for by the simultaneous
60- linear equations constructed by this object. The object is described in full in the method `data_vector`.
61-
62- This method is used to compute part of the `data_vector` if there are also linear function list objects
63- in the inversion, and is separated into a separate method to enable preloading of the mapper `data_vector`.
64- """
65-
66- if not self .has (cls = AbstractMapper ):
67- return
68-
69- data_vector = np .zeros (self .total_params )
70-
71- mapper_list = self .cls_list_from (cls = AbstractMapper )
72- mapper_param_range_list = self .param_range_list_from (cls = AbstractMapper )
73-
74- for i in range (len (mapper_list )):
75- mapper = mapper_list [i ]
76- param_range = mapper_param_range_list [i ]
77-
78- operated_mapping_matrix = self .psf .convolved_mapping_matrix_from (
79- mapping_matrix = mapper .mapping_matrix , mask = self .mask , xp = self ._xp
80- )
81-
82- data_vector_mapper = (
83- inversion_imaging_util .data_vector_via_blurred_mapping_matrix_from (
84- blurred_mapping_matrix = operated_mapping_matrix ,
85- image = self .data ,
86- noise_map = self .noise_map ,
87- )
88- )
89-
90- data_vector [param_range [0 ] : param_range [1 ],] = data_vector_mapper
91-
92- return data_vector
93-
9456 @cached_property
9557 def data_vector (self ) -> np .ndarray :
9658 """
@@ -111,53 +73,6 @@ def data_vector(self) -> np.ndarray:
11173 noise_map = self .noise_map .array ,
11274 )
11375
114- @property
115- def _curvature_matrix_mapper_diag (self ) -> Optional [np .ndarray ]:
116- """
117- Returns the diagonal regions of the `curvature_matrix`, a 2D matrix which uses the mappings between the data
118- and the linear objects to construct the simultaneous linear equations. The object is described in full in
119- the method `curvature_matrix`.
120-
121- This method computes the diagonal entries of all mapper objects in the `curvature_matrix`. It is separate from
122- other calculations to enable preloading of this calculation.
123- """
124-
125- if not self .has (cls = AbstractMapper ):
126- return None
127-
128- curvature_matrix = np .zeros ((self .total_params , self .total_params ))
129-
130- mapper_list = self .cls_list_from (cls = AbstractMapper )
131- mapper_param_range_list = self .param_range_list_from (cls = AbstractMapper )
132-
133- for i in range (len (mapper_list )):
134- mapper_i = mapper_list [i ]
135- mapper_param_range_i = mapper_param_range_list [i ]
136-
137- operated_mapping_matrix = self .psf .convolved_mapping_matrix_from (
138- mapping_matrix = mapper_i .mapping_matrix , mask = self .mask , xp = self ._xp
139- )
140-
141- diag = inversion_util .curvature_matrix_via_mapping_matrix_from (
142- mapping_matrix = operated_mapping_matrix ,
143- noise_map = self .noise_map ,
144- settings = self .settings ,
145- add_to_curvature_diag = True ,
146- no_regularization_index_list = self .no_regularization_index_list ,
147- xp = self ._xp ,
148- )
149-
150- curvature_matrix [
151- mapper_param_range_i [0 ] : mapper_param_range_i [1 ],
152- mapper_param_range_i [0 ] : mapper_param_range_i [1 ],
153- ] = diag
154-
155- curvature_matrix = inversion_util .curvature_matrix_mirrored_from (
156- curvature_matrix = curvature_matrix , xp = self ._xp
157- )
158-
159- return curvature_matrix
160-
16176 @cached_property
16277 def curvature_matrix (self ):
16378 """
0 commit comments