@attr(speed='slow')
def test_3d_transpose_lowmem():
    """ low mem. reading/writing of transposed 3D RNMRTK time domain file """

    dir_3d = os.path.join(DATA_DIR, 'rnmrtk_3d')
    # T1 T2 T3 ordering
    dic, data = ng.rnmrtk.read_lowmem(os.path.join(
        dir_3d, "time_3d_t1_t2_t3.sec"))
    assert data.shape == (128, 88, 36)
    assert np.abs(data[2, 6, 4].real - -1.82) <= 0.01
    assert dic['npts'] == [64, 44, 36]
    lowmem_write_readback(dic, data)

    # T1 T3 T2 ordering
    dic, data = ng.rnmrtk.read_lowmem(os.path.join(
        dir_3d, "time_3d_t1_t3_t2.sec"))
    assert data.shape == (128, 72, 44)
    assert np.abs(-1.82 - data[2, 8, 3].real) <= 0.01
    assert dic['npts'] == [64, 44, 36]
    lowmem_write_readback(dic, data)

    # T2 T1 T3 ordering
    dic, data = ng.rnmrtk.read_lowmem(os.path.join(
        dir_3d, "time_3d_t2_t1_t3.sec"))
    assert data.shape == (88, 128, 36)
    assert np.abs(data[6, 2, 4].real - -1.82) <= 0.01
    assert dic['npts'] == [64, 44, 36]
    lowmem_write_readback(dic, data)

    # T2 T3 T1 ordering
    dic, data = ng.rnmrtk.read_lowmem(os.path.join(
        dir_3d, "time_3d_t2_t3_t1.sec"))
    assert data.shape == (88, 72, 64)
    assert np.abs(data[6, 8, 1].real - -1.82) <= 0.01
    assert dic['npts'] == [64, 44, 36]
    lowmem_write_readback(dic, data)

    # T3 T1 T2 ordering
    dic, data = ng.rnmrtk.read_lowmem(os.path.join(
        dir_3d, "time_3d_t3_t1_t2.sec"))
    assert data.shape == (72, 128, 44)
    assert np.abs(data[8, 2, 3].real - -1.82) <= 0.01
    assert dic['npts'] == [64, 44, 36]
    lowmem_write_readback(dic, data)

    # T3 T2 T1 ordering
    dic, data = ng.rnmrtk.read_lowmem(os.path.join(
        dir_3d, "time_3d_t3_t2_t1.sec"))
    assert data.shape == (72, 88, 64)
    assert np.abs(data[8, 6, 1].real - -1.82) <= 0.01
    assert dic['npts'] == [64, 44, 36]
    lowmem_write_readback(dic, data)
dataset/ETHPy150Open jjhelmus/nmrglue/tests/test_rnmrtk.py/test_3d_transpose_lowmem/swapped operands of `-`