Ejemplo n.º 1
0
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())
Ejemplo n.º 2
0
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]
Ejemplo n.º 3
0
def test_folder():
    d = DataModel.fromPath(rel_path("../data/tiffstacks"))
    print(d)
Ejemplo n.º 4
0
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)