def test_speed(): import time fName = rel_path("../data/spimdata") t = [] d = DataModel.fromPath(fName, 1) for i in range(100): print(i) if i % 10 == 0: a = d[i // 10] time.sleep(.01) t.append(time.time())
def test_frompaths(): from glob import glob fnames = glob(rel_path("../data/*")) if len(fnames) == 0: raise ValueError("could not find any test data!") print(fnames) for f in fnames: if os.path.splitext(f)[1] == ".raw": print("raw ...skipping") continue print(f) d = DataModel.fromPath(f) print(d) for i in np.random.randint(0, d.sizeT(), 10): print(i) a = d[i]
def test_folder(): d = DataModel.fromPath(rel_path("../data/tiffstacks")) print(d)
def test_folder(): print("test folder") d = DataModel.fromPath(rel_path("../data/tiffstacks")) print("thread is running: ", d.dataLoadThread.isRunning()) print(d) time.sleep(.1)