def _test_checkTimeAliasingUTE(self): import matplotlib.pyplot as plt obj = Reconstruction(self.tracerBaseloc + '-AC', v=True) dyn = obj.checkTimeAliasingUTE(fcomment='_checkTimeAliasingUTE') plt.matshow(dyn[0]['im'][60, :, :]) plt.matshow(dyn[1]['im'][60, :, :]) plt.show()
def test_createTwilitePhantom(self): import matplotlib.pyplot as plt obj = Reconstruction(self.twiliteBaseloc + '-AC', v=True, phantom=True) sta = obj.createPhantom(fcomment='_createPhantom') plt.matshow(sta['im'][60, :, :]) plt.matshow(sta['im'][:, 170, :]) plt.matshow(sta['im'][:, :, 170]) plt.show()
def test_createTracerStaticNAC(self): import matplotlib.pyplot as plt obj = Reconstruction(self.tracerBaseloc + '-NAC', v=True) sta = obj.createStaticNAC(fcomment='_createStaticNAC') plt.matshow(sta['im'][60, :, :]) plt.matshow(sta['im'][:, 170, :]) plt.matshow(sta['im'][:, :, 170]) plt.show()
def _test_checkTimeAliasingCarney(self): import matplotlib.pyplot as plt obj = Reconstruction(self.tracerBaseloc + '-AC') dyn = obj.checkTimeAliasingCarney(fcomment='_checkTimeAliasingCarney') plt.matshow(dyn['im'][60, :, :]) plt.matshow(dyn['im'][:, 170, :]) plt.matshow(dyn['im'][:, :, 170]) plt.show()
def test_createTracerUTE(self): import matplotlib.pyplot as plt obj = Reconstruction(self.tracerBaseloc + '-AC', v=True) dyn = obj.createDynamicUTE(fcomment='_createDynamicUTE') plt.matshow(dyn['im'][60, :, :]) plt.matshow(dyn['im'][:, 170, :]) plt.matshow(dyn['im'][:, :, 170]) plt.show()
def _test_createUmapSynthFullBlurred_tracer(self): obj = Reconstruction( self.tracerBaseloc + '-NAC', '/data/nil-bluearc/raichle/PPGdata/jjlee2/HYGLY23/V2/FDG_V2-NAC') if not os.path.isfile(obj.umapSynthFileprefix + '.nii.gz'): obj.createUmapSynthFullBlurred() else: print(obj.umapSynthFileprefix + '.nii.gz already exists')
def test_createTracerNAC(self): import matplotlib.pyplot as plt obj = Reconstruction(self.tracerBaseloc + '-NAC', v=True, devid=1) dyn = obj.createDynamicNAC(fcomment='_createDynamicNAC') if dyn: plt.matshow(dyn['im'][60, :, :]) plt.matshow(dyn['im'][:, 170, :]) plt.matshow(dyn['im'][:, :, 170]) plt.show()
def test_createTracerStaticCarney(self): import matplotlib.pyplot as plt obj = Reconstruction(self.tracerBaseloc + '-AC', v=True) sta = obj.createStaticCarney(time0=0, timeF=600, fcomment='_createStaticCarney') plt.matshow(sta['im'][60, :, :]) plt.matshow(sta['im'][:, 170, :]) plt.matshow(sta['im'][:, :, 170]) plt.show()
def test_createTracerStaticUTE(self): import matplotlib.pyplot as plt mids = ['HYGLY30/V2/Twilite_V2'] loc = '/home2/jjlee/Docker/NiftyPETd/' + mids[0] + '-Converted' obj = Reconstruction(loc, v=True) sta = obj.createStaticUTE(fcomment='_createStaticUTE') plt.matshow(sta['im'][60, :, :]) plt.matshow(sta['im'][:, 170, :]) plt.matshow(sta['im'][:, :, 170]) plt.show()
def test_createAllTracerCarneys(self): from glob2 import glob sespth = '/scratch/jjlee/Singularity/CCIR_00559/ses-E120895' tracers = ['FDG' 'OC', 'OO', 'HO'] for t in tracers: trapths = glob(os.path.join(sespth, t + '_DT*.000000-Converted-AC')) for p in trapths: obj = Reconstruction(p, v=True) obj.createDynamic2Carney()
def test_createAllTracerNACs(self): from glob2 import glob sespth = '/home2/jjlee/Singularity/CCIR_00754/ses-E00165' tracers = ['OC', 'OO', 'HO', 'FDG'] for t in tracers: trapths = glob( os.path.join(sespth, t + '_DT*.000000-Converted-NAC')) for p in trapths: obj = Reconstruction(p, v=True) obj.createDynamicNAC()
def test_createTracerCarney(self): import matplotlib.pyplot as plt locs = [self.tracerBaseloc] for lo in locs: obj = Reconstruction(lo + '-AC', v=True, minTime=0) dyn = obj.createDynamic2Carney(fcomment='_createDynamic2Carney') if dyn: plt.matshow(dyn['im'][60, :, :]) plt.matshow(dyn['im'][:, 170, :]) plt.matshow(dyn['im'][:, :, 170]) plt.show()
def test_scatter(self): obj = Reconstruction(self.tracerBaseloc + '-AC', v=True) obj.checkScattering(fcomment='_checkScattering')
def test_getWTime(self): obj = Reconstruction(self.tracerBaseloc + '-NAC') print(obj.getWTime())
def test_getTimeMax(self): obj = Reconstruction(self.tracerBaseloc + '-NAC') self.assertEqual(obj.getTimeMax(), 601)
def test_getTimes(self): obj = Reconstruction(self.tracerBaseloc + '-NAC') print(obj.getTimes(obj.getTaus()))
def test_lm_dcmread(self): obj = Reconstruction(self.tracerBaseloc + '-NAC') print(obj.lm_dcmread())
def test_acquisitiontime(self): obj = Reconstruction(self.tracerBaseloc + '-NAC') print(obj.lm_acquisitiontime())
def theTestObj(self): obj = Reconstruction(self.tracerBaseloc + '-AC') obj.itr = 3 obj.fwhm = 0 # 4.3 / 2.08626 # num. of voxels obj.use_stored_hist = True return obj
def test_mirror(self): pth = '/scratch/jjlee/Singularity/CCIR_00754/ses-E201038/OO_DT20161216112441.000000-Converted-AC' obj = Reconstruction(pth, v=True, minTime=0, si=31) obj.checkScattering(fcomment='_checkScattering') obj.createDynamic2Carney(fcomment='_createDynamic2Carney')
def test_tracerMemory(self): obj = Reconstruction(self.tracerBaseloc + '-NAC', v=True) self.assertEqual('Oxygen', obj.tracerMemory)