Changeset ce8c7bd in sasview
- Timestamp:
- Aug 4, 2017 2:56:58 AM (7 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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 44daa56
- Parents:
- 4dd90bf
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/associations.py
r511ccb2d rce8c7bd 26 26 ".dat": "red2d_reader", 27 27 ".abs": "abs_reader", 28 ".d1d": "hfir1d_reader",29 28 ".sans": "danse_reader", 30 29 ".pdh": "anton_paar_saxs_reader" -
test/sasdataloader/test/utest_abs_reader.py
r4dd90bf rce8c7bd 8 8 from sas.sascalc.dataloader.loader import Loader 9 9 from sas.sascalc.dataloader.readers.abs_reader import Reader as AbsReader 10 from sas.sascalc.dataloader.readers.hfir1d_reader import Reader as HFIRReader11 10 from sas.sascalc.dataloader.readers.danse_reader import Reader as DANSEReader 12 11 from sas.sascalc.dataloader.readers.cansas_reader import Reader as CANSASReader … … 71 70 data = Loader().load("jan08002.ABS") 72 71 self.assertEqual(data.meta_data['loader'], "IGOR 1D") 73 74 75 class hfir_reader(unittest.TestCase):76 77 def setUp(self):78 reader = HFIRReader()79 self.data = reader.read("S2-30dq.d1d")80 81 def test_hfir_checkdata(self):82 """83 Check the data content to see whether84 it matches the specific file we loaded.85 """86 self.assertEqual(self.data.filename, "S2-30dq.d1d")87 # THIS FILE FORMAT IS CURRENTLY READ BY THE ASCII READER88 self.assertEqual(self.data.meta_data['loader'], "HFIR 1D")89 self.assertEqual(len(self.data.x), 134)90 self.assertEqual(len(self.data.y), 134)91 # Q I dI dQ92 # Point 1: 0.003014 0.003010 0.000315 0.00824993 self.assertEqual(self.data.x[1], 0.003014)94 self.assertEqual(self.data.y[1], 0.003010)95 self.assertEqual(self.data.dy[1], 0.000315)96 self.assertEqual(self.data.dx[1], 0.008249)97 98 def test_generic_loader(self):99 # the generic loader should work as well100 data = Loader().load("S2-30dq.d1d")101 self.assertEqual(data.meta_data['loader'], "HFIR 1D")102 72 103 73 class DanseReaderTests(unittest.TestCase):
Note: See TracChangeset
for help on using the changeset viewer.