Ignore:
Timestamp:
Feb 18, 2015 5:28:13 AM (9 years ago)
Author:
krzywon
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:
ddc192a
Parents:
d838715
Message:

Fixed the failing test associated with data loading and sector averaging
in utest_averaging.py. The ascii data loader throws out values where q=0
but the calculator does not resulting causing the first issue. The 2nd
issue was invalid starting and ending points in the sector calculation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/dataloader/readers/ascii_reader.py

    r79492222 ref3445e2  
    6767                    raise  RuntimeError, "ascii_reader: cannot open %s" % path 
    6868                buff = input_f.read() 
    69                 lines = buff.split('\n') 
    70                  
    71                 #Jae could not find python universal line spliter: 
    72                 #keep the below for now 
    73                 # some ascii data has \r line separator, 
    74                 # try it when the data is on only one long line 
    75                 if len(lines) < 2 : 
    76                     lines = buff.split('\r') 
     69                lines = buff.splitlines() 
    7770                  
    7871                x  = numpy.zeros(0) 
     
    8174                dx = numpy.zeros(0) 
    8275                 
    83                #temp. space to sort data 
     76                #temp. space to sort data 
    8477                tx  = numpy.zeros(0) 
    8578                ty  = numpy.zeros(0) 
     
    220213                                pass 
    221214                             
    222                         x = numpy.append(x, _x)  
     215                        x = numpy.append(x, _x) 
    223216                        y = numpy.append(y, _y) 
    224217                         
     
    294287                        i += 1 
    295288                    except: 
    296  
    297289                        # It is data and meet non - number, then stop reading 
    298290                        if is_data == True: 
Note: See TracChangeset for help on using the changeset viewer.