示例#1
0
 def test_calculator(self):
     """
     Test that the calculator calculates.
     """
     f = self.omfloader.read(find("A_Raw_Example-1.omf"))
     omf2sld = sas_gen.OMF2SLD()
     omf2sld.set_data(f)
     model = sas_gen.GenSAS()
     model.set_sld_data(omf2sld.output)
     x = np.linspace(0, 0.1, 11)[1:]
     model.runXY([x, x])
示例#2
0
 def test_omfreader(self):
     """
     Test .omf file loaded 
     """
     f = self.omfloader.read("A_Raw_Example-1.omf")
     output = sas_gen.OMF2SLD()
     output.set_data(f)
     self.assertEqual(f.mx[0], 0)
     self.assertEqual(f.my[0], 0)
     self.assertEqual(f.mz[0], 0)
     self.assertEqual(output.pos_x[0], 0.0)
     self.assertEqual(output.pos_y[0], 0.0)
     self.assertEqual(output.pos_z[0], 0.0)