Changeset 1b1a1c1 in sasview for src/sas/sascalc
- Timestamp:
- Oct 7, 2016 11:28:39 AM (8 years ago)
- 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:
- dd72190
- Parents:
- 286c757
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/data_info.py
r45d7662 r1b1a1c1 881 881 raise ValueError, msg 882 882 # Here we could also extrapolate between data points 883 ZERO = 1.0e-12883 TOLERANCE = 0.01 884 884 for i in range(len(self.x)): 885 if math.fabs( self.x[i] - other.x[i]) > ZERO:885 if math.fabs((self.x[i] - other.x[i])/self.x[i]) > TOLERANCE: 886 886 msg = "Incompatible data sets: x-values do not match" 887 887 raise ValueError, msg … … 1093 1093 """ 1094 1094 err_other = None 1095 TOLERANCE = 0.01 1095 1096 if isinstance(other, Data2D): 1096 1097 # Check that data lengths are the same … … 1101 1102 raise ValueError, msg 1102 1103 for ind in range(len(self.data)): 1103 if self.qx_data[ind] != other.qx_data[ind]:1104 msg = "Incompatible data sets: qx-values do not match "1104 if math.fabs((self.qx_data[ind] - other.qx_data[ind])/self.qx_data[ind]) > TOLERANCE: 1105 msg = "Incompatible data sets: qx-values do not match: %s %s" % (self.qx_data[ind], other.qx_data[ind]) 1105 1106 raise ValueError, msg 1106 if self.qy_data[ind] != other.qy_data[ind]:1107 msg = "Incompatible data sets: qy-values do not match "1107 if math.fabs((self.qy_data[ind] - other.qy_data[ind])/self.qy_data[ind]) > TOLERANCE: 1108 msg = "Incompatible data sets: qy-values do not match: %s %s" % (self.qy_data[ind], other.qy_data[ind]) 1108 1109 raise ValueError, msg 1109 1110
Note: See TracChangeset
for help on using the changeset viewer.