#NEWLINE# def test_2d_lowmem( ) : #NEWLINE# #INDENT# ' lowmemory reading/writing of 2D bruker data' #NEWLINE# ( dic , data ) = ng . bruker . read_lowmem ( os . path . join ( DATA_DIR , 'bruker_2d' ) ) #NEWLINE# assert ( dic [ 'FILE_SIZE' ] == 3686400 ) #NEWLINE# assert ( data . shape == ( 600 , 768 ) ) #NEWLINE# assert ( np . abs ( ( data [ ( 0 , 40 ) ] . real - 28.0 ) ) <= 0.01 ) #NEWLINE# assert ( np . abs ( ( data [ ( 0 , 40 ) ] . imag - ( - 286.0 ) ) ) <= 0.01 ) #NEWLINE# assert ( np . abs ( ( data [ ( 13 , 91 ) ] . real - ( - 7279.0 ) ) ) <= 0.01 ) #NEWLINE# assert ( np . abs ( ( data [ ( 13 , 91 ) ] . imag - ( - 17680.0 ) ) ) <= 0.01 ) #NEWLINE# lowmem_write_readback ( dic , data )