Commit 0562c784 authored by Mo Shahdloo's avatar Mo Shahdloo
Browse files

flag tests

parent 26a3ea40
......@@ -11,6 +11,7 @@ test_data_vb_broken = op.join(op.dirname(__file__), 'test_data', 'meas_MID111_sL
test_data_gre = op.join(op.dirname(__file__), 'test_data', 'meas_MID00058_FID12358_gre_3D.dat')
test_data_epi = op.join(op.dirname(__file__), 'test_data', 'meas_MID00053_FID12353_ep2d_QA_2mm_15ch_inplane_Grappa2_100.dat')
def test_flagRemoveOS():
twixObj = mapVBVD(test_data_gre, quiet=False)
twixObj[1].image.flagRemoveOS = False
......@@ -25,15 +26,27 @@ def test_flagRemoveOS():
twixObj.image.flagRemoveOS = True
assert np.allclose(twixObj.image.dataSize, [2048, 32, 1, 1, 1, 1, 1, 1, 1, 97, 1, 1, 1, 1, 1, 1])
def test_flagIgnoreSeg_flagDoAverage():
twixObj = mapVBVD(test_data_epi, quiet=False)
twixObj[1].image.flagIgnoreSeg = False
assert np.allclose(twixObj[1].image.dataSize, [86, 15, 86, 1, 36, 1, 1, 1, 100, 1, 2, 1, 1, 1, 1, 1])
twixObj[1].image.flagIgnoreSeg = True
assert np.allclose(twixObj[1].image.dataSize, [86, 15, 86, 1, 36, 1, 1, 1, 100, 1, 1, 1, 1, 1, 1, 1])
twixObj[1].refscanPC.flagDoAverage = False
assert np.allclose(twixObj[1].refscanPC.dataSize, [86, 15, 86, 1, 36, 1, 1, 1, 100, 1, 2, 1, 1, 1, 1, 1])
twixObj[1].refscanPC.flagDoAverage = True
assert np.allclose(twixObj[1].refscanPC.dataSize, [86, 15, 86, 1, 36, 1, 1, 1, 100, 1, 1, 1, 1, 1, 1, 1])
twixObj[1].refscan_phasecor.flagIgnoreSeg = False
twixObj[1].refscan_phasecor.flagDoAverage = False
assert np.allclose(twixObj[1].refscan_phasecor.dataSize, [86, 15, 1, 1, 36, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1])
twixObj[1].refscan_phasecor.flagDoAverage = True
assert np.allclose(twixObj[1].refscan_phasecor.dataSize, [86, 15, 1, 1, 36, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1])
twixObj[1].refscan_phasecor.flagIgnoreSeg = True
twixObj[1].refscan_phasecor.flagDoAverage = False
assert np.allclose(twixObj[1].refscan_phasecor.dataSize, [86, 15, 1, 1, 36, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])
twixObj[1].refscan_phasecor.flagDoAverage = True
assert np.allclose(twixObj[1].refscan_phasecor.dataSize, [86, 15, 1, 1, 36, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])
def test_flagSkipToFirstLine():
twixObj = mapVBVD(test_data_epi, quiet=False)
twixObj[1].refscan.flagSkipToFirstLine = False
assert np.allclose(twixObj[1].refscan.dataSize, [86, 15, 55, 1, 36, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1])
twixObj[1].refscan.flagSkipToFirstLine = True
assert np.allclose(twixObj[1].refscan.dataSize, [86, 15, 24, 1, 36, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment