@@ -53,47 +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 ,
80- mask = self .mask ,
81- use_mixed_precision = self .settings .use_mixed_precision ,
82- xp = self ._xp
83- )
84-
85- data_vector_mapper = (
86- inversion_imaging_util .data_vector_via_blurred_mapping_matrix_from (
87- blurred_mapping_matrix = operated_mapping_matrix ,
88- image = self .data ,
89- noise_map = self .noise_map ,
90- )
91- )
92-
93- data_vector [param_range [0 ] : param_range [1 ],] = data_vector_mapper
94-
95- return data_vector
96-
9756 @cached_property
9857 def data_vector (self ) -> np .ndarray :
9958 """
@@ -114,56 +73,6 @@ def data_vector(self) -> np.ndarray:
11473 noise_map = self .noise_map .array ,
11574 )
11675
117- @property
118- def _curvature_matrix_mapper_diag (self ) -> Optional [np .ndarray ]:
119- """
120- Returns the diagonal regions of the `curvature_matrix`, a 2D matrix which uses the mappings between the data
121- and the linear objects to construct the simultaneous linear equations. The object is described in full in
122- the method `curvature_matrix`.
123-
124- This method computes the diagonal entries of all mapper objects in the `curvature_matrix`. It is separate from
125- other calculations to enable preloading of this calculation.
126- """
127-
128- if not self .has (cls = AbstractMapper ):
129- return None
130-
131- curvature_matrix = np .zeros ((self .total_params , self .total_params ))
132-
133- mapper_list = self .cls_list_from (cls = AbstractMapper )
134- mapper_param_range_list = self .param_range_list_from (cls = AbstractMapper )
135-
136- for i in range (len (mapper_list )):
137- mapper_i = mapper_list [i ]
138- mapper_param_range_i = mapper_param_range_list [i ]
139-
140- operated_mapping_matrix = self .psf .convolved_mapping_matrix_from (
141- mapping_matrix = mapper_i .mapping_matrix ,
142- mask = self .mask ,
143- use_mixed_precision = self .settings .use_mixed_precision ,
144- xp = self ._xp
145- )
146-
147- diag = inversion_util .curvature_matrix_via_mapping_matrix_from (
148- mapping_matrix = operated_mapping_matrix ,
149- noise_map = self .noise_map ,
150- settings = self .settings ,
151- add_to_curvature_diag = True ,
152- no_regularization_index_list = self .no_regularization_index_list ,
153- xp = self ._xp ,
154- )
155-
156- curvature_matrix [
157- mapper_param_range_i [0 ] : mapper_param_range_i [1 ],
158- mapper_param_range_i [0 ] : mapper_param_range_i [1 ],
159- ] = diag
160-
161- curvature_matrix = inversion_util .curvature_matrix_mirrored_from (
162- curvature_matrix = curvature_matrix , xp = self ._xp
163- )
164-
165- return curvature_matrix
166-
16776 @cached_property
16877 def curvature_matrix (self ):
16978 """
0 commit comments