Example #1
0
def test_convert_meta():
    data, meta = load('test/resources/input')
    newdata, newmeta = convert(data, meta)
    assert newmeta['nrois'] == 1
    assert len(newmeta['rois']) == 1
    assert newmeta['nplanes'] == 1
    assert newmeta['nchannels'] == 1
    assert newmeta['shape'] == (23, 464, 576)
Example #2
0
def test_convert_ground_truth():
    data, meta = load('test/resources/input')
    newdata, newmeta = convert(data, meta)
    truth = fromtif('test/resources/output')
    assert newdata.shape == truth.shape
    assert allclose(newdata.clip(0, inf), truth)
Example #3
0
def test_convert_data_array():
    data, meta = load('test/resources/input')
    newdata, newmeta = convert(data.toarray(), meta)
    assert newdata.shape == (23, 464, 576)
Example #4
0
def test_convert_data():
    data, meta = load('test/resources/input')
    newdata, newmeta = convert(data, meta)
    assert newdata.shape == (23, 464, 576)
    assert newdata.dtype == 'int16'
Example #5
0
import mesoscope as ms

data, metadata = ms.load('test/resources/input')
newdata, newmetadata = ms.convert(data, metadata)

print('shape before conversion')
print(data.shape)
print('shape after conversion')
print(newdata.shape)