@@ -273,62 +273,4 @@ def transform_mapping_matrix(self, mapping_matrix):
273273
274274 transformed_mapping_matrix [:, source_pixel_1d_index ] = visibilities
275275
276- return transformed_mapping_matrix
277-
278- def forward_lop (self , x ):
279- """
280- Forward NUFFT on CPU
281- :param x: The input numpy array, with the size of Nd or Nd + (batch,)
282- :type: numpy array with the dtype of numpy.complex64
283- :return: y: The output numpy array, with the size of (M,) or (M, batch)
284- :rtype: numpy array with the dtype of numpy.complex64
285- """
286-
287- warnings .filterwarnings ("ignore" )
288-
289- x2d = array_2d_util .array_2d_native_complex_via_indexes_from (
290- array_2d_slim = x ,
291- shape_native = self .real_space_mask .shape_native ,
292- native_index_for_slim_index_2d = self .native_index_for_slim_index ,
293- )[::- 1 , :]
294-
295- y = self .k2y (self .xx2k (self .x2xx (x2d )))
296- return np .concatenate ((y .real , y .imag ), axis = 0 )
297-
298- def adjoint_lop (self , y ):
299- """
300- Adjoint NUFFT on CPU
301- :param y: The input numpy array, with the size of (M,) or (M, batch)
302- :type: numpy array with the dtype of numpy.complex64
303- :return: x: The output numpy array,
304- with the size of Nd or Nd + (batch, )
305- :rtype: numpy array with the dtype of numpy.complex64
306- """
307-
308- warnings .filterwarnings ("ignore" )
309-
310- def a_complex_from (a_real , a_imag ):
311- return a_real + 1j * a_imag
312-
313- y = a_complex_from (
314- a_real = y [: int (self .shape [0 ] / 2.0 )], a_imag = y [int (self .shape [0 ] / 2.0 ) :]
315- )
316-
317- x2d = np .real (self .xx2x (self .k2xx (self .y2k (y ))))
318-
319- x = array_2d_util .array_2d_slim_complex_from (
320- array_2d_native = x2d [::- 1 , :],
321- mask = np .array (self .real_space_mask ),
322- )
323- x = x .real # NOTE:
324-
325- # NOTE:
326- x *= self .adjoint_scaling
327-
328- return x
329-
330- def _matvec (self , x ):
331- return self .forward_lop (x )
332-
333- def _rmatvec (self , x ):
334- return self .adjoint_lop (x )
276+ return transformed_mapping_matrix
0 commit comments