Skip to content

Commit

Permalink
tests for show_contrast
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-taylor committed Oct 31, 2013
1 parent 6a65f26 commit 9a0ddf0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions nipy/modalities/fmri/tests/test_dmtx.py
Expand Up @@ -71,6 +71,23 @@ def test_show_dmtx():
ax = DM.show()
assert (ax is not None)

# test the colormap
ax = DM.show(cmap=matplotlib.pyplot.cm.gray)
assert (ax is not None)

@dec.skipif(not have_mpl)
def test_show_constrast():
# test that the show code indeed (formally) runs
frametimes = np.linspace(0, 127 * 1.,128)
DM = make_dmtx(frametimes, drift_model='polynomial', drift_order=3)
contrast = np.random.standard_normal((3, DM.matrix.shape[1]))
ax = DM.show_contrast(contrast)
assert (ax is not None)

# test the colormap
ax = DM.show_contrast(contrast, cmap=matplotlib.pyplot.cm.gray)
assert (ax is not None)


def test_dmtx0():
# Test design matrix creation when no paradigm is provided
Expand Down

0 comments on commit 9a0ddf0

Please sign in to comment.