@@ -107,56 +107,3 @@ def test__delaunay_mapper():
107107 1.0e-2 ,
108108 )
109109
110-
111- def test__voronoi_mapper ():
112- pytest .importorskip (
113- "autoarray.util.nn.nn_py" ,
114- reason = "Voronoi C library not installed, see util.nn README.md" ,
115- )
116-
117- mask = aa .Mask2D (
118- mask = [
119- [True , True , True , True , True ],
120- [True , True , False , True , True ],
121- [True , False , False , False , True ],
122- [True , True , False , True , True ],
123- [True , True , True , True , True ],
124- ],
125- pixel_scales = 1.0 ,
126- )
127-
128- # Slightly manipulate input grid so sub gridding is evidence in first source pixel.
129- grid = aa .Grid2D .from_mask (mask = mask , over_sample_size = 2 )
130-
131- grid .over_sampled [0 , 0 ] = - 2.0
132- grid .over_sampled [0 , 1 ] = 2.0
133-
134- mesh = aa .mesh .Voronoi ()
135- image_mesh = aa .image_mesh .Overlay (shape = (3 , 3 ))
136- image_plane_mesh_grid = image_mesh .image_plane_mesh_grid_from (
137- mask = mask , adapt_data = None
138- )
139-
140- mapper_grids = mesh .mapper_grids_from (
141- mask = mask ,
142- border_relocator = None ,
143- source_plane_data_grid = grid ,
144- source_plane_mesh_grid = image_plane_mesh_grid ,
145- )
146-
147- mapper = aa .Mapper (mapper_grids = mapper_grids , regularization = None )
148-
149- assert (mapper .source_plane_mesh_grid == image_plane_mesh_grid ).all ()
150- assert mapper .source_plane_mesh_grid .origin == pytest .approx ((0.0 , 0.0 ), 1.0e-4 )
151-
152- # assert mapper.mapping_matrix == pytest.approx(
153- # np.array(
154- # [
155- # [0.6875, 0.0, 0.0, 0.3125, 0.0],
156- # [0.0, 1.0, 0.0, 0.0, 0.0],
157- # [0.125, 0.125, 0.5, 0.125, 0.125],
158- # [0.0, 0.0, 0.0, 0.9375, 0.0625],
159- # [0.0, 0.0, 0.0, 0.0, 1.0],
160- # ]
161- # )
162- # )
0 commit comments