Changeset 0e5e586 in sasview for DataLoader/readers


Ignore:
Timestamp:
Jul 16, 2009 3:55:54 PM (15 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
d9dbb76
Parents:
b9d5f88
Message:

changed min. required # of lines (5 lines now) and enable to distinguish # of columns (even more than 4 col.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/readers/ascii_reader.py

    r730c9eb r0e5e586  
    9393                 
    9494                #Initialize counters for data lines and header lines. 
    95                 is_data = False #Has more than 3 lines 
    96                 mum_data_lines = 10 # More than "3" lines of data is considered as actual data unless that is the only data 
     95                is_data = False #Has more than 5 lines 
     96                mum_data_lines = 5 # More than "5" lines of data is considered as actual data unless that is the only data 
    9797 
    9898                i=-1            # To count # of current data candidate lines 
     
    164164                        #After talked with PB, we decided to take care of only 4 columns of data for now. 
    165165                        #number of columns in the current line 
    166                         if len(toks)>= 4: 
    167                             new_lentoks = 4 
    168                         else: 
    169                             new_lentoks = len(toks) 
     166                        #To remember the # of columns in the current line of data 
     167                        new_lentoks = len(toks) 
    170168                         
    171169                        #If the previous columns not equal to the current, mark the previous as non-data and reset the dependents.   
     
    243241                            if is_data == False: 
    244242                                i1 = -1                             
    245                         if len(toks)>= 4: 
    246                             lentoks = 4 
    247                         else: 
    248                             lentoks = len(toks) 
     243                        #To remember the # of columns on the current line for the next line of data 
     244                        lentoks = len(toks) 
    249245                         
    250246                        #Reset # of header lines and counts # of data candidate lines     
Note: See TracChangeset for help on using the changeset viewer.