@@ -327,10 +327,6 @@ def test__simulate_imaging_data_and_fit__linear_light_profiles_and_pixelization(
327327 settings = al .Settings (
328328 use_positive_only_solver = True ,
329329 ),
330- preloads = al .Preloads (
331- mapper_indices = range (1 , 10 ),
332- source_pixel_zeroed_indices = np .array ([1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 ])
333- )
334330 )
335331
336332 assert fit_linear .inversion .reconstruction == pytest .approx (
@@ -459,10 +455,6 @@ def test__simulate_imaging_data_and_fit__linear_light_profiles_and_pixelization_
459455 settings = al .Settings (
460456 use_positive_only_solver = True ,
461457 ),
462- preloads = al .Preloads (
463- mapper_indices = range (1 , 10 ),
464- source_pixel_zeroed_indices = np .array ([1 , 2 , 3 , 4 , 6 , 7 , 8 , 9 ])
465- )
466458 )
467459
468460 assert fit_linear .inversion .reconstruction == pytest .approx (
@@ -533,7 +525,7 @@ def test__simulate_imaging_data_and_fit__linear_light_profiles_and_pixelization_
533525 )
534526
535527 pixelization = al .Pixelization (
536- mesh = al .mesh .Delaunay (),
528+ mesh = al .mesh .Delaunay (pixels = 25 , zeroed_pixels = 5 ),
537529 regularization = al .reg .AdaptSplit (inner_coefficient = 0.01 , outer_coefficient = 0.1 , signal_scale = 0.1 ),
538530 )
539531
@@ -550,27 +542,13 @@ def test__simulate_imaging_data_and_fit__linear_light_profiles_and_pixelization_
550542 galaxy_image_plane_mesh_grid_dict = {source_galaxy_pix : image_plane_mesh_grid },
551543 )
552544
553- total_mapper_pixels = image_plane_mesh_grid .shape [0 ]
554-
555- total_linear_light_profiles = 1
556-
557- mapper_indices = al .mapper_indices_from (
558- total_linear_light_profiles = total_linear_light_profiles ,
559- total_mapper_pixels = total_mapper_pixels ,
560- )
561-
562- preloads = al .Preloads (
563- mapper_indices = mapper_indices ,
564- )
565-
566545 tracer_linear = al .Tracer (
567546 galaxies = [lens_galaxy_linear , source_galaxy_pix ]
568547 )
569548
570549 fit_linear = al .FitImaging (
571550 dataset = masked_dataset ,
572551 tracer = tracer_linear ,
573- preloads = preloads ,
574552 adapt_images = adapt_images ,
575553 settings = al .Settings (use_positive_only_solver = False ),
576554 )
@@ -611,34 +589,27 @@ def test__simulate_imaging_data_and_fit__linear_light_profiles_and_pixelization_
611589 0.180018267146 , 1.0e-4
612590 )
613591
614- preloads = al .Preloads (
615- mapper_indices = mapper_indices ,
616- source_pixel_zeroed_indices = [2 , 4 , 5 , 7 , 8 , 9 , 12 , 14 , 17 , 19 , 21 , 22 , 24 ]
617- )
618592
619593 fit_linear = al .FitImaging (
620594 dataset = masked_dataset ,
621595 tracer = tracer_linear ,
622- preloads = preloads ,
623596 adapt_images = adapt_images ,
624597 settings = al .Settings (
625598 use_positive_only_solver = True ,
599+ use_edge_zeroed_pixels = True
626600 ),
627601 )
628602
629- print (fit_linear .inversion .reconstruction )
630- print (fit_linear .figure_of_merit )
631-
632603 assert fit_linear .inversion .reconstruction [0 :2 ] == pytest .approx (
633604 np .array (
634605 [
635- 100.00111892 ,
636- 1.56139854
606+ 99.9785287998059 ,
607+ 0.8958653625423
637608 ]
638609 ),
639610 1.0e-4 ,
640611 )
641- assert fit_linear .figure_of_merit == pytest .approx (- 190.665986828461 , 1.0e-4 )
612+ assert fit_linear .figure_of_merit == pytest .approx (- 190.6935526756 , 1.0e-4 )
642613
643614
644615def test__simulate_imaging_data_and_fit__complex_fit_compare_mapping_matrix_sparse_operator ():
0 commit comments