Changeset d96744de in sasview
- Timestamp:
- Dec 21, 2018 8:34:39 AM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249
- Children:
- 1342f6a
- Parents:
- 109afbd
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/abs_reader.py
r35ac8df rd96744de 48 48 detector = Detector() 49 49 data_line = 0 50 x_index = 4 50 51 self.reset_data_list(len(lines)) 51 52 self.current_datainfo.detector.append(detector) … … 63 64 for line in lines: 64 65 # Information line 1 66 if line.find(".bt5") > 0: 67 x_index = 0 65 68 if is_info: 66 69 is_info = False … … 171 174 172 175 try: 173 _x = float(toks[ 4])176 _x = float(toks[x_index]) 174 177 _y = float(toks[1]) 175 178 _dy = float(toks[2]) -
test/sasdataloader/test/utest_abs_reader.py
rf4e2f22 rd96744de 77 77 78 78 def test_usans_negative_dxl(self): 79 data_abs = Loader().load(find("sam14_cor.ABS")) 80 data_cor = Loader().load(find("sam14_cor. cor"))81 for i in range(0, len(data_abs ) - 1):79 data_abs = Loader().load(find("sam14_cor.ABS"))[0] 80 data_cor = Loader().load(find("sam14_cor.txt"))[0] 81 for i in range(0, len(data_abs.x) - 1): 82 82 self.assertEqual(data_abs.x[i], data_cor.x[i]) 83 83 self.assertEqual(data_abs.y[i], data_cor.y[i]) 84 self.assertEqual(data_abs.dxl[i], data_cor.dxl[i]) 85 self.assertEqual(data_abs.dxw[i], data_cor.dxw[i]) 86 self.assertTrue(data_abs.dxl > 0) 84 self.assertEqual(data_abs.dxl[i], -data_cor.dx[i]) 85 self.assertTrue(data_abs.dxl[i] > 0) 87 86 88 87
Note: See TracChangeset
for help on using the changeset viewer.