@@ -528,17 +528,24 @@ def test_data_sampler_memoryhook(slices, newshape, interpolation, ensure_clean_m
528
528
529
529
530
530
@pytest .mark .cupy
531
+ @pytest .mark .parametrize ("padding_detx" , [0 , 10 , 100 , 200 ])
531
532
@pytest .mark .parametrize ("projections" , [1801 , 3601 ])
532
533
@pytest .mark .parametrize ("slices" , [7 , 11 , 15 ])
533
534
@pytest .mark .parametrize ("detectorX" , [1200 , 2560 ])
534
535
def test_recon_FBP3d_tomobar_memoryhook (
535
- slices , detectorX , projections , ensure_clean_memory , mocker : MockerFixture
536
+ slices ,
537
+ detectorX ,
538
+ projections ,
539
+ padding_detx ,
540
+ ensure_clean_memory ,
541
+ mocker : MockerFixture ,
536
542
):
537
543
data = cp .random .random_sample ((projections , slices , detectorX ), dtype = np .float32 )
538
544
kwargs = {}
539
545
kwargs ["angles" ] = np .linspace (
540
546
0.0 * np .pi / 180.0 , 180.0 * np .pi / 180.0 , data .shape [0 ]
541
547
)
548
+ kwargs ["detector_pad" ] = padding_detx
542
549
kwargs ["center" ] = 500
543
550
kwargs ["recon_size" ] = detectorX
544
551
kwargs ["recon_mask_radius" ] = 0.8
@@ -579,61 +586,88 @@ def test_recon_FBP3d_tomobar_memoryhook(
579
586
580
587
581
588
@pytest .mark .cupy
582
- # @pytest.mark.parametrize("projections", [1801])
583
- # @pytest.mark.parametrize("detX_size", [2560])
584
- # @pytest.mark.parametrize("slices", [15])
585
- # @pytest.mark.parametrize("projection_angle_range", [(0, np.pi)])
586
-
587
-
589
+ @pytest .mark .parametrize ("padding_detx" , [0 , 10 , 50 , 100 ])
588
590
@pytest .mark .parametrize ("projections" , [1500 , 1801 , 2560 ])
589
591
@pytest .mark .parametrize ("detX_size" , [2560 ])
590
592
@pytest .mark .parametrize ("slices" , [3 , 4 , 5 , 10 , 15 , 20 ])
591
593
@pytest .mark .parametrize ("projection_angle_range" , [(0 , np .pi )])
592
-
593
- # @pytest.mark.parametrize("projections", [1500, 1801, 2560])
594
- # @pytest.mark.parametrize("detX_size", [2560])
595
- # @pytest.mark.parametrize("slices", [3, 4, 5, 10])
596
- # @pytest.mark.parametrize("projection_angle_range", [(0, np.pi)])
597
594
def test_recon_LPRec3d_tomobar_0_pi_memoryhook (
598
- slices , detX_size , projections , projection_angle_range , ensure_clean_memory
595
+ slices ,
596
+ detX_size ,
597
+ projections ,
598
+ projection_angle_range ,
599
+ padding_detx ,
600
+ ensure_clean_memory ,
599
601
):
600
602
__test_recon_LPRec3d_tomobar_memoryhook_common (
601
- slices , detX_size , projections , projection_angle_range , ensure_clean_memory
603
+ slices ,
604
+ detX_size ,
605
+ projections ,
606
+ projection_angle_range ,
607
+ padding_detx ,
608
+ ensure_clean_memory ,
602
609
)
603
610
604
611
605
612
@pytest .mark .full
606
613
@pytest .mark .cupy
614
+ @pytest .mark .parametrize ("padding_detx" , [0 , 10 , 50 , 100 ])
607
615
@pytest .mark .parametrize ("projections" , [1500 , 1801 , 2560 , 3601 ])
608
616
@pytest .mark .parametrize ("detX_size" , [2560 ])
609
617
@pytest .mark .parametrize ("slices" , [3 , 4 , 5 , 10 , 15 , 20 ])
610
618
@pytest .mark .parametrize ("projection_angle_range" , [(0 , np .pi )])
611
619
def test_recon_LPRec3d_tomobar_0_pi_memoryhook_full (
612
- slices , detX_size , projections , projection_angle_range , ensure_clean_memory
620
+ slices ,
621
+ detX_size ,
622
+ projections ,
623
+ projection_angle_range ,
624
+ padding_detx ,
625
+ ensure_clean_memory ,
613
626
):
614
627
__test_recon_LPRec3d_tomobar_memoryhook_common (
615
- slices , detX_size , projections , projection_angle_range , ensure_clean_memory
628
+ slices ,
629
+ detX_size ,
630
+ projections ,
631
+ projection_angle_range ,
632
+ padding_detx ,
633
+ ensure_clean_memory ,
616
634
)
617
635
618
636
619
637
@pytest .mark .full
620
638
@pytest .mark .cupy
639
+ @pytest .mark .parametrize ("padding_detx" , [0 , 10 , 50 , 100 ])
621
640
@pytest .mark .parametrize ("projections" , [1500 , 1801 , 2560 , 3601 ])
622
641
@pytest .mark .parametrize ("detX_size" , [2560 ])
623
642
@pytest .mark .parametrize ("slices" , [3 , 4 , 5 , 10 , 15 , 20 ])
624
643
@pytest .mark .parametrize (
625
644
"projection_angle_range" , [(0 , np .pi ), (0 , 2 * np .pi ), (- np .pi / 2 , np .pi / 2 )]
626
645
)
627
646
def test_recon_LPRec3d_tomobar_memoryhook_full (
628
- slices , detX_size , projections , projection_angle_range , ensure_clean_memory
647
+ slices ,
648
+ detX_size ,
649
+ projections ,
650
+ projection_angle_range ,
651
+ padding_detx ,
652
+ ensure_clean_memory ,
629
653
):
630
654
__test_recon_LPRec3d_tomobar_memoryhook_common (
631
- slices , detX_size , projections , projection_angle_range , ensure_clean_memory
655
+ slices ,
656
+ detX_size ,
657
+ projections ,
658
+ projection_angle_range ,
659
+ padding_detx ,
660
+ ensure_clean_memory ,
632
661
)
633
662
634
663
635
664
def __test_recon_LPRec3d_tomobar_memoryhook_common (
636
- slices , detX_size , projections , projection_angle_range , ensure_clean_memory
665
+ slices ,
666
+ detX_size ,
667
+ projections ,
668
+ projection_angle_range ,
669
+ padding_detx ,
670
+ ensure_clean_memory ,
637
671
):
638
672
angles_number = projections
639
673
data = cp .random .random_sample ((angles_number , slices , detX_size ), dtype = np .float32 )
@@ -642,6 +676,7 @@ def __test_recon_LPRec3d_tomobar_memoryhook_common(
642
676
projection_angle_range [0 ], projection_angle_range [1 ], data .shape [0 ]
643
677
)
644
678
kwargs ["center" ] = 1280
679
+ kwargs ["detector_pad" ] = padding_detx
645
680
kwargs ["recon_size" ] = detX_size
646
681
kwargs ["recon_mask_radius" ] = 0.8
647
682
@@ -687,9 +722,9 @@ def __test_recon_LPRec3d_tomobar_memoryhook_common(
687
722
if slices <= 3 :
688
723
assert percents_relative_maxmem <= 75
689
724
elif slices <= 5 :
690
- assert percents_relative_maxmem <= 60
725
+ assert percents_relative_maxmem <= 63
691
726
else :
692
- assert percents_relative_maxmem <= 47
727
+ assert percents_relative_maxmem <= 50
693
728
694
729
695
730
@pytest .mark .cupy
0 commit comments