Ignore:
Timestamp:
Oct 8, 2016 3:33:04 PM (8 years ago)
Author:
jhbakker
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
1fac6c0
Parents:
7988501 (diff), f7bc948 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'ajj_sesans' into Jurrian1D

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/data_info.py

    r7988501 r51a4d78  
    797797                raise ValueError, msg 
    798798            # Here we could also extrapolate between data points 
    799             ZERO = 1.0e-12 
     799            TOLERANCE = 0.01 
    800800            for i in range(len(self.x)): 
    801                 if math.fabs(self.x[i] - other.x[i]) > ZERO: 
     801                if math.fabs((self.x[i] - other.x[i])/self.x[i]) > TOLERANCE: 
    802802                    msg = "Incompatible data sets: x-values do not match" 
    803803                    raise ValueError, msg 
     
    10091009        """ 
    10101010        err_other = None 
     1011        TOLERANCE = 0.01 
    10111012        if isinstance(other, Data2D): 
    10121013            # Check that data lengths are the same 
     
    10171018                raise ValueError, msg 
    10181019            for ind in range(len(self.data)): 
    1019                 if self.qx_data[ind] != other.qx_data[ind]: 
    1020                     msg = "Incompatible data sets: qx-values do not match" 
     1020                if math.fabs((self.qx_data[ind] - other.qx_data[ind])/self.qx_data[ind]) > TOLERANCE: 
     1021                    msg = "Incompatible data sets: qx-values do not match: %s %s" % (self.qx_data[ind], other.qx_data[ind]) 
    10211022                    raise ValueError, msg 
    1022                 if self.qy_data[ind] != other.qy_data[ind]: 
    1023                     msg = "Incompatible data sets: qy-values do not match" 
     1023                if math.fabs((self.qy_data[ind] - other.qy_data[ind])/self.qy_data[ind]) > TOLERANCE: 
     1024                    msg = "Incompatible data sets: qy-values do not match: %s %s" % (self.qy_data[ind], other.qy_data[ind]) 
    10241025                    raise ValueError, msg 
    10251026 
Note: See TracChangeset for help on using the changeset viewer.