@@ -47,7 +47,6 @@ def setUp(self):
4747 template = pet .AcquisitionData (path )
4848 self .image1 = template .get_uniform_copy (0 )
4949 self .image2 = template .get_uniform_copy (0 )
50- # assert False
5150 self .set_storage_scheme ()
5251
5352
@@ -71,8 +70,28 @@ def setUp(self):
7170 template = pet .AcquisitionData (path )
7271 self .image1 = template .get_uniform_copy (0 )
7372 self .image2 = template .get_uniform_copy (0 )
74- # assert False
7573 pet .AcquisitionData .set_storage_scheme ('memory' )
7674 def test_division_by_datacontainer_zero (self ):
7775 # skip this test as currently cSIRF doesn't throw
7876 pass
77+
78+ class TestSTIRAcquisitionDataSubsetAlgebraMemory (unittest .TestCase , DataContainerAlgebraTests ):
79+ def setUp (self ):
80+ pet .AcquisitionData .set_storage_scheme ('memory' )
81+ path = os .path .join (
82+ examples_data_path ('PET' ), 'thorax_single_slice' , 'template_sinogram.hs' )
83+ if os .path .exists (path ):
84+ template = pet .AcquisitionData (path )
85+ prompts = template .get_uniform_copy (0 )
86+ # create a staggered list of views for 2 subsets
87+ views = prompts .dimensions ()[2 ]
88+ indices = list (range (views ))
89+ num_batches = 2
90+ batches = [indices [i ::num_batches ] for i in range (num_batches )]
91+
92+ self .image1 = prompts .get_subset (batches [0 ])
93+ self .image2 = prompts .get_subset (batches [0 ])
94+
95+ def test_division_by_datacontainer_zero (self ):
96+ # skip this test as currently cSIRF doesn't throw
97+ pass
0 commit comments