@@ -8,21 +8,11 @@ class NUFFTPlaceholder:
88 pass
99
1010
11- class PyLopsPlaceholder :
12- pass
13-
14-
1511try :
1612 from pynufft .linalg .nufft_cpu import NUFFT_cpu
1713except ModuleNotFoundError :
1814 NUFFT_cpu = NUFFTPlaceholder
1915
20- try :
21- import pylops
22-
23- PyLopsOperator = pylops .LinearOperator
24- except ModuleNotFoundError :
25- PyLopsOperator = PyLopsPlaceholder
2616
2717from autoarray .structures .arrays .uniform_2d import Array2D
2818from autoarray .structures .grids .uniform_2d import Grid2D
@@ -42,20 +32,8 @@ def pynufft_exception():
4232 )
4333
4434
45- def pylops_exception ():
46- raise ModuleNotFoundError (
47- "\n --------------------\n "
48- "You are attempting to perform interferometer analysis.\n \n "
49- "However, the optional library PyLops (https://github.com/PyLops/pylops) is not installed.\n \n "
50- "Install it via the command `pip install pylops==2.3.1`.\n \n "
51- "----------------------"
52- )
53-
54-
55- class TransformerDFT (PyLopsOperator ):
35+ class TransformerDFT :
5636 def __init__ (self , uv_wavelengths , real_space_mask , preload_transform = True ):
57- if isinstance (self , PyLopsPlaceholder ):
58- pylops_exception ()
5937
6038 super ().__init__ ()
6139
@@ -146,14 +124,11 @@ def transform_mapping_matrix(self, mapping_matrix):
146124 )
147125
148126
149- class TransformerNUFFT (NUFFT_cpu , PyLopsOperator ):
127+ class TransformerNUFFT (NUFFT_cpu ):
150128 def __init__ (self , uv_wavelengths , real_space_mask ):
151129 if isinstance (self , NUFFTPlaceholder ):
152130 pynufft_exception ()
153131
154- if isinstance (self , PyLopsPlaceholder ):
155- pylops_exception ()
156-
157132 super (TransformerNUFFT , self ).__init__ ()
158133
159134 self .uv_wavelengths = uv_wavelengths
0 commit comments