#NEWLINE# def test_braindata( ) : #NEWLINE# #INDENT# vol = np . random . randn ( * volshape ) #NEWLINE# tf = tempfile . TemporaryFile ( suffix = '.png' ) #NEWLINE# mask = db . get_mask ( subj , xfmname , 'thick' ) #NEWLINE# data = dataset . Volume ( vol , subj , xfmname , cmap = 'RdBu_r' , vmin = 0 , vmax = 1 ) #NEWLINE# mdata = data . masked [ 'thick' ] #NEWLINE# assert ( len ( mdata . data ) == mask . sum ( ) ) #NEWLINE# assert np . allclose ( mdata . volume [ : , mask ] , mdata . data )