#NEWLINE# @ testing . requires_testing_data #NEWLINE# @ requires_freesurfer #NEWLINE# @ requires_nibabel ( ) #NEWLINE# def test_vertex_to_mni_fs_nibabel( ) : #NEWLINE# #INDENT# 'Test equivalence of vert_to_mni for nibabel and freesurfer\n    ' #NEWLINE# n_check = 1000 #NEWLINE# subject = 'sample' #NEWLINE# vertices = rng . randint ( 0 , 100000 , n_check ) #NEWLINE# hemis = rng . randint ( 0 , 1 , n_check ) #NEWLINE# coords = vertex_to_mni ( vertices , hemis , subject , subjects_dir , 'nibabel' ) #NEWLINE# coords_2 = vertex_to_mni ( vertices , hemis , subject , subjects_dir , 'freesurfer' ) #NEWLINE# assert_allclose ( coords , coords_2 , atol = 0.1 )