#NEWLINE# @ attr ( speed = 'fast' ) #NEWLINE# def test_2d_lowmem( ) : #NEWLINE# #INDENT# ' low memory reading/writing of 2D Varian file ' #NEWLINE# ( dic , data ) = ng . varian . read_lowmem ( os . path . join ( DATA_DIR , 'agilent_2d' ) ) #NEWLINE# assert ( data . shape == ( 332 , 1500 ) ) #NEWLINE# assert ( np . abs ( ( data [ ( 0 , 1 ) ] . real - 360.07 ) ) <= 0.01 ) #NEWLINE# assert ( np . abs ( ( data [ ( 0 , 1 ) ] . imag - ( - 223.2 ) ) ) <= 0.01 ) #NEWLINE# assert ( np . abs ( ( data [ ( 10 , 18 ) ] . real - 17.93 ) ) <= 0.01 ) #NEWLINE# assert ( np . abs ( ( data [ ( 10 , 18 ) ] . imag - ( - 67.2 ) ) ) <= 0.01 ) #NEWLINE# lowmem_write_readback ( data , data )