Changeset a90df05 in sasview


Ignore:
Timestamp:
Jan 18, 2012 12:47:57 PM (13 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:
602645d
Parents:
33b7954
Message:

set x=0 data point as x=1e-16 instead of skip reading

Location:
sansdataloader/src/sans/dataloader/readers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sansdataloader/src/sans/dataloader/readers/abs_reader.py

    r953fe92 ra90df05  
    1919except: 
    2020    has_converter = False 
    21      
     21_ZERO = 1e-16   
    2222class Reader: 
    2323    """ 
     
    229229                if len(x) == 0: 
    230230                    raise ValueError, "ascii_reader: could not load file" 
    231                  
     231                x[x==0] = _ZERO 
     232                y[x==0] = _ZERO 
    232233                output.x = x[x!=0] 
    233234                output.y = y[x!=0] 
  • sansdataloader/src/sans/dataloader/readers/ascii_reader.py

    ref9d209 ra90df05  
    333333                    dy[dy==0] = _ZERO 
    334334                #Data     
     335                x[x==0] = _ZERO 
     336                y[x==0] = _ZERO 
    335337                output.x = x[x!=0] 
    336338                output.y = y[x!=0] 
  • sansdataloader/src/sans/dataloader/readers/cansas_reader.py

    rad8034f ra90df05  
    559559        if not numpy.all(dy==0): 
    560560            dy[dy==0] = _ZERO 
    561         
     561        x[x==0] = _ZERO 
     562        y[x==0] = _ZERO 
    562563        data_info.x = x[x!=0] 
    563564        data_info.y = y[x!=0] 
Note: See TracChangeset for help on using the changeset viewer.