Changeset da96629 in sasview


Ignore:
Timestamp:
May 21, 2011 1:18:32 PM (14 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:
121c224
Parents:
1ab9dc1
Message:

taking care of zero errors

Location:
DataLoader/readers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/readers/ascii_reader.py

    ra7a5886 rda96629  
    2323except: 
    2424    has_converter = False 
     25_ZERO = 1e-16 
    2526 
    2627class Reader: 
     
    323324                    if has_error_dx == True: 
    324325                        dx[i] = tdx[ind[i]] 
     326                # Zeros in dx, dy  
     327                if has_error_dx: 
     328                    dx[dx==0] = _ZERO 
     329                if has_error_dy: 
     330                    dy[dy==0] = _ZERO 
    325331                #Data     
    326332                output.x = x 
  • DataLoader/readers/cansas_reader.py

    rfd224fd rda96629  
    3838from lxml import etree 
    3939import xml.dom.minidom 
    40  
     40_ZERO = 1e-16 
    4141has_converter = True 
    4242try: 
     
    554554                dxl = numpy.append(dxl, _dxl) 
    555555                dxw = numpy.append(dxw, _dxw) 
     556        # Zeros in dx, dy  
     557        dx[dx==0] = _ZERO 
     558        dy[dy==0] = _ZERO 
    556559                 
    557560        data_info.x = x 
    558561        data_info.y = y 
    559562        data_info.dx = dx 
     563         
    560564        data_info.dy = dy 
    561565        data_info.dxl = dxl 
     
    583587        else: 
    584588            data_info.yaxis("\\rm{Intensity}","cm^{-1}") 
    585          
     589 
    586590        return data_info 
    587591 
Note: See TracChangeset for help on using the changeset viewer.