Exemplo n.º 1
0
    def test_1_simple(self):
    
        B = BlockProcess()
        B.path_in  = ["./data/vagus001.h5","volume/data"]
        B.path_out = ["/tmp/test.h5","data"]
        B.Process = func 
        B.run()
        res_Block = h5py.File("/tmp/test.h5")["data/axons"][::]

        data_in  = h5py.File("./data/vagus001.h5")["volume/data"][::]
        res_Norm = func(data_in)[0]

        assert numpy.mean(res_Block!=0) == numpy.mean(res_Norm!=0)
Exemplo n.º 2
0
    def test_2_8Blocks(self):
    
        B = BlockProcess()
        B.path_in  = ["./data/vagus001.h5","volume/data"]
        B.path_out = ["/tmp/test.h5","data"]
        B.blockSize = [75, 75, 25]
        B.helo = 10
        B.Process = func 
        B.Workers=6
        B.run()
        res_Block = h5py.File("/tmp/test.h5")["data/axons"][::]

        data_in  = h5py.File("./data/vagus001.h5")["volume/data"][::]
        res_Norm = func(data_in)[0]

        assert numpy.mean(res_Block!=0) == numpy.mean(res_Norm!=0)