File tree Expand file tree Collapse file tree
test_autoarray/inversion/inversion Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313from autoarray .structures .visibilities import VisibilitiesNoiseMap
1414
1515from autoarray .structures .arrays import array_2d_util
16+ from autoarray .inversion .inversion import inversion_util
1617
1718logger = logging .getLogger (__name__ )
1819
@@ -152,10 +153,8 @@ def w_tilde(self):
152153
153154 logger .info ("INTERFEROMETER - Computing W-Tilde... May take a moment." )
154155
155- from autoarray .inversion .inversion import inversion_util_secret
156-
157156 curvature_preload = (
158- inversion_util_secret .w_tilde_curvature_preload_interferometer_from (
157+ inversion_util .w_tilde_curvature_preload_interferometer_from (
159158 noise_map_real = np .array (self .noise_map .real ),
160159 uv_wavelengths = np .array (self .uv_wavelengths ),
161160 shape_masked_pixels_2d = np .array (
@@ -167,7 +166,7 @@ def w_tilde(self):
167166 )
168167 )
169168
170- w_matrix = inversion_util_secret .w_tilde_via_preload_from (
169+ w_matrix = inversion_util .w_tilde_via_preload_from (
171170 w_tilde_preload = curvature_preload ,
172171 native_index_for_slim_index = self .real_space_mask .derive_indexes .native_for_slim ,
173172 )
Original file line number Diff line number Diff line change @@ -207,11 +207,6 @@ def inversion_interferometer_from(
207207 -------
208208 An `Inversion` whose type is determined by the input `dataset` and `settings`.
209209 """
210- try :
211- from autoarray .inversion .inversion import inversion_util_secret
212- except ImportError :
213- settings .use_w_tilde = False
214-
215210 if any (
216211 isinstance (linear_obj , AbstractLinearObjFuncList )
217212 for linear_obj in linear_obj_list
Original file line number Diff line number Diff line change @@ -125,12 +125,10 @@ def curvature_matrix_diag(self) -> np.ndarray:
125125 w_tilde = self .w_tilde .w_matrix , mapping_matrix = self .mapping_matrix
126126 )
127127
128- from autoarray .inversion .inversion import inversion_util_secret
129-
130128 mapper = self .cls_list_from (cls = AbstractMapper )[0 ]
131129
132130 if not self .settings .use_source_loop :
133- return inversion_util_secret .curvature_matrix_via_w_tilde_curvature_preload_interferometer_from (
131+ return inversion_util .curvature_matrix_via_w_tilde_curvature_preload_interferometer_from (
134132 curvature_preload = self .w_tilde .curvature_preload ,
135133 pix_indexes_for_sub_slim_index = mapper .pix_indexes_for_sub_slim_index ,
136134 pix_size_for_sub_slim_index = mapper .pix_sizes_for_sub_slim_index ,
@@ -145,7 +143,7 @@ def curvature_matrix_diag(self) -> np.ndarray:
145143 sub_slim_weights_for_pix_index ,
146144 ) = mapper .sub_slim_indexes_for_pix_index_arr
147145
148- return inversion_util_secret .curvature_matrix_via_w_tilde_curvature_preload_interferometer_from_2 (
146+ return inversion_util .curvature_matrix_via_w_tilde_curvature_preload_interferometer_from_2 (
149147 curvature_preload = self .w_tilde .curvature_preload ,
150148 native_index_for_slim_index = self .transformer .real_space_mask .derive_indexes .native_for_slim ,
151149 pix_pixels = self .linear_obj_list [0 ].params ,
You can’t perform that action at this time.
0 commit comments