#NEWLINE# def read_xreim( filename ) : #NEWLINE# #INDENT# 'Read a 1D indexed SIMPSON file.  See :py:func:`read`.' #NEWLINE# f = open ( filename , 'r' ) #NEWLINE# for ( iline , line ) in enumerate ( f ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# NP = int ( ( iline + 1 ) ) #NEWLINE# f . seek ( 0 ) #NEWLINE# data = np . empty ( ( NP , ) , dtype = 'complex64' ) #NEWLINE# units = np . empty ( ( NP , ) , dtype = 'float32' ) #NEWLINE# for ( l_idx , line ) in enumerate ( f ) : #NEWLINE# #INDENT# ( np_unit , r_val , i_val ) = [ float ( i ) for i in line . split ( ) ] #NEWLINE# units [ l_idx ] = np_unit #NEWLINE# data . real [ l_idx ] = r_val #NEWLINE# data . imag [ l_idx ] = i_val #NEWLINE# #UNINDENT# f . close ( ) #NEWLINE# return ( { #NEWLINE# #INDENT# 'units' : units , #NEWLINE# #UNINDENT# } , data )