Example #1
0
 def test_empty_confounds(self):
     '''Expect that clean_image will receive None as value for confounds 
     keyword when conf_prep is empty confounds table.'''
     denoise = Denoise(
         fmri_prep=self.fmri_prep,
         conf_prep=self.conf_prep,
         pipeline=self.pipeline,
         output_dir=self.out_dir.name,
     )
     denoise._load_confouds()
     self.assertEqual(denoise._confounds, None)
Example #2
0
 def test_non_empty_confounds(self):
     '''Expect that clean_image will receive correctly loaded confounds as 
     numpy.ndarray.'''
     conf_prep = pd.DataFrame(np.random.random((100, 2)))
     conf_prep.to_csv(self.conf_prep, sep='\t', index=False)
     denoise = Denoise(
         fmri_prep=self.fmri_prep,
         conf_prep=self.conf_prep,
         pipeline=self.pipeline,
         output_dir=self.out_dir.name,
     )
     denoise._load_confouds()
     self.assertEqual(denoise._confounds.shape, (100, 2))