Changeset 4c00964 in sasview for DataLoader/test
- Timestamp:
- Aug 28, 2008 4:53:26 PM (16 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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 579ba85
- Parents:
- 3c404d3
- Location:
- DataLoader/test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
DataLoader/test/cansas1d.xml
rd6513cd r4c00964 51 51 <SASinstrument name="TEST instrument"> 52 52 <name>canSAS instrument</name> 53 <SASsource >53 <SASsource name="source name"> 54 54 <radiation>neutron</radiation> 55 55 <beam_size> … … 65 65 </wavelength_spread> 66 66 </SASsource> 67 <SAScollimation >67 <SAScollimation name="test coll name"> 68 68 <length unit='mm'> 123.0</length> 69 69 <aperture name="source" type="radius"> … … 90 90 <yaw unit="degree">0.00</yaw> 91 91 </orientation> 92 <offset> 93 <x unit="mm">1</x> 94 <y unit="mm">2</y> 95 </offset> 92 96 <beam_center> 93 97 <x unit="mm">322.64</x> -
DataLoader/test/testplugings.py
r16d8e5f r4c00964 50 50 self.assertEqual(output.x[i],x[i]) 51 51 self.assertEqual(output.y[i],y[i]) 52 53 # How about actually executing the tests... 54 if __name__ == '__main__': 55 unittest.main() -
DataLoader/test/utest_abs_reader.py
rd6513cd r4c00964 207 207 raise RuntimeError, "Could not find all data %s %s" % (_found1, _found2) 208 208 209 # Detector 210 self.assertEqual(self.data.detector[0].name, "fictional hybrid") 211 self.assertEqual(self.data.detector[0].distance_unit, "m") 212 self.assertEqual(self.data.detector[0].distance, 4.150) 213 214 self.assertEqual(self.data.detector[0].orientation_unit, "degree") 215 self.assertEqual(self.data.detector[0].orientation.x, 1.0) 216 self.assertEqual(self.data.detector[0].orientation.y, 0.0) 217 self.assertEqual(self.data.detector[0].orientation.z, 0.0) 218 219 self.assertEqual(self.data.detector[0].offset_unit, "m") 220 self.assertEqual(self.data.detector[0].offset.x, .01) 221 self.assertEqual(self.data.detector[0].offset.y, .02) 222 self.assertEqual(self.data.detector[0].offset.z, None) 223 224 self.assertEqual(self.data.detector[0].beam_center_unit, "mm") 225 self.assertEqual(self.data.detector[0].beam_center.x, 322.64) 226 self.assertEqual(self.data.detector[0].beam_center.y, 327.68) 227 self.assertEqual(self.data.detector[0].beam_center.z, None) 228 229 self.assertEqual(self.data.detector[0].pixel_size_unit, "mm") 230 self.assertEqual(self.data.detector[0].pixel_size.x, 5) 231 self.assertEqual(self.data.detector[0].pixel_size.y, 5) 232 self.assertEqual(self.data.detector[0].pixel_size.z, None) 233 234 # Process 235 236 237 238 def test_writer(self): 239 from DataLoader.readers.cansas_reader import Reader 240 r = Reader() 241 x = numpy.ones(5) 242 y = numpy.ones(5) 243 dy = numpy.ones(5) 244 245 d = Loader().load("jan08002.ABS") 246 #d = Data1D(x, y, dy) 247 r.write("write_test.xml", d) 248 249 209 250 210 251
Note: See TracChangeset
for help on using the changeset viewer.