#NEWLINE# def _get_data_size( self , header ) : #NEWLINE# #INDENT# '\n        Calculate the size of the data set in terms of a seek distance\n\n        ' #NEWLINE# start_pos = self . file . tell ( ) #NEWLINE# data_count = 0 #NEWLINE# while ( data_count < header [ 'ncol' ] ) : #NEWLINE# #INDENT# column_data = self . file . readline ( ) #NEWLINE# arr_column_data = column_data . split ( ) #NEWLINE# data_count += len ( arr_column_data ) #NEWLINE# #UNINDENT# if ( data_count != header [ 'ncol' ] ) : #NEWLINE# #INDENT# raise Exception ( ( 'Unexpected data formatting in head file.  Expected %d columns, but found %d.' % header [ 'ncol' ] ) , stop_pos ) #NEWLINE# #UNINDENT# stop_pos = self . file . tell ( ) #NEWLINE# data_seek_distance = ( stop_pos - start_pos ) #NEWLINE# self . file . seek ( start_pos ) #NEWLINE# return data_seek_distance