Ignore:
Timestamp:
Jul 2, 2007, 5:25:38 PM (17 years ago)
Author:
ole
Message:

Improved verbose reporting when large data files are
processed block wise. This works best for pts files,
but would be good to do for txt and cvs as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/fit_interpolate/fit.py

    r4572 r4576  
    325325            assert point_origin is None, msg
    326326            filename = point_coordinates_or_filename
    327            
    328             for i, geo_block in enumerate(Geospatial_data(filename,
    329                                               max_read_lines=max_read_lines,
    330                                               load_file_now=False,
    331                                               verbose=verbose)):
     327
     328            G_data = Geospatial_data(filename,
     329                                     max_read_lines=max_read_lines,
     330                                     load_file_now=False,
     331                                     verbose=verbose)
     332            for i, geo_block in enumerate(G_data):
    332333                if verbose is True and 0 == i%200: # round every 5 minutes
    333334                    # But this is dependant on the # of Triangles, so it
    334335                    #isn't every 5 minutes.
    335                     print 'Block %i' %i
     336                       
     337                    print 'Processing Block %d' %i
     338                    # FIXME (Ole): It would be good to say how many blocks
     339                    # there are here. But this is no longer necessary
     340                    # for pts files as they are reported in geospatial_data
     341                    # I suggest deleting this verbose output and make
     342                    # Geospatial_data more informative for txt files.
     343           
     344
     345                   
    336346                # build the array
    337347                points = geo_block.get_data_points(absolute=True)
Note: See TracChangeset for help on using the changeset viewer.