示例#1
0
 def test_loader_option(self):
     out6 = LoadAndMerge(Filename='967101',LoaderName='LoadILLDiffraction',
                          LoaderVersion=1,LoaderOptions=dict({'DataType':'Raw'}))
     self.assertTrue(out6)
     self.assertEqual(out6.name(), 'out6')
     self.assertTrue(isinstance(out6, MatrixWorkspace))
     mtd.clear()
示例#2
0
 def test_loader_option(self):
     out6 = LoadAndMerge(Filename='967101',LoaderName='LoadILLDiffraction',
                          LoaderVersion=1,LoaderOptions=dict({'DataType':'Raw'}))
     self.assertTrue(out6)
     self.assertEquals(out6.name(), 'out6')
     self.assertTrue(isinstance(out6, MatrixWorkspace))
     mtd.clear()
示例#3
0
 def test_many_runs_summed(self):
     out2 = LoadAndMerge(Filename='170257+170258',
                         LoaderName='LoadILLIndirect')
     self.assertTrue(out2)
     self.assertEqual(out2.name(), 'out2')
     self.assertTrue(isinstance(out2, MatrixWorkspace))
     mtd.clear()
示例#4
0
 def test_specific_loader(self):
     out5 = LoadAndMerge(
         Filename='170257',
         LoaderName='LoadILLIndirect',
     )
     self.assertTrue(out5)
     self.assertEqual(out5.name(), 'out5')
     self.assertTrue(isinstance(out5, MatrixWorkspace))
示例#5
0
 def test_concatenate_output(self):
     out = LoadAndMerge(Filename='010444:010446',
                        OutputBehaviour='Concatenate')
     self.assertTrue(out)
     self.assertEqual(out.name(), 'out')
     self.assertTrue(isinstance(out, MatrixWorkspace))
     self.assertEqual(out.blocksize(), 3)
     self.assertEqual(out.readX(0)[0], 0)
     self.assertEqual(out.readX(0)[1], 1)
     self.assertEqual(out.readX(0)[2], 2)
示例#6
0
 def test_many_runs_mixed(self):
     out4 = LoadAndMerge(Filename='170257+170258,170300+170302',LoaderName='LoadILLIndirect')
     self.assertTrue(out4)
     self.assertEqual(out4.name(), 'out4')
     self.assertTrue(isinstance(out4, WorkspaceGroup))
     self.assertEqual(out4.getNumberOfEntries(), 2)
     self.assertTrue(isinstance(out4.getItem(0), MatrixWorkspace))
     self.assertTrue(isinstance(out4.getItem(1), MatrixWorkspace))
     self.assertEqual(out4.getItem(0).name(),'170257_170258')
     self.assertEqual(out4.getItem(1).name(),'170300_170302')
     mtd.clear()
示例#7
0
 def test_many_runs_listed(self):
     out3 = LoadAndMerge(Filename='170257,170258',LoaderName='LoadILLIndirect')
     self.assertTrue(out3)
     self.assertEqual(out3.name(), 'out3')
     self.assertTrue(isinstance(out3, WorkspaceGroup))
     self.assertEqual(out3.getNumberOfEntries(), 2)
     self.assertTrue(isinstance(out3.getItem(0), MatrixWorkspace))
     self.assertTrue(isinstance(out3.getItem(1), MatrixWorkspace))
     self.assertEqual(out3.getItem(0).name(),'170257')
     self.assertEqual(out3.getItem(1).name(),'170258')
     mtd.clear()
示例#8
0
 def test_many_runs_mixed(self):
     out4 = LoadAndMerge(Filename='170257+170258,170300+170302',LoaderName='LoadILLIndirect')
     self.assertTrue(out4)
     self.assertEquals(out4.name(), 'out4')
     self.assertTrue(isinstance(out4, WorkspaceGroup))
     self.assertEquals(out4.getNumberOfEntries(), 2)
     self.assertTrue(isinstance(out4.getItem(0), MatrixWorkspace))
     self.assertTrue(isinstance(out4.getItem(1), MatrixWorkspace))
     self.assertEquals(out4.getItem(0).name(),'170257_170258')
     self.assertEquals(out4.getItem(1).name(),'170300_170302')
     mtd.clear()
示例#9
0
 def test_many_runs_listed(self):
     out3 = LoadAndMerge(Filename='170257,170258',LoaderName='LoadILLIndirect')
     self.assertTrue(out3)
     self.assertEquals(out3.name(), 'out3')
     self.assertTrue(isinstance(out3, WorkspaceGroup))
     self.assertEquals(out3.getNumberOfEntries(), 2)
     self.assertTrue(isinstance(out3.getItem(0), MatrixWorkspace))
     self.assertTrue(isinstance(out3.getItem(1), MatrixWorkspace))
     self.assertEquals(out3.getItem(0).name(),'170257')
     self.assertEquals(out3.getItem(1).name(),'170258')
     mtd.clear()
示例#10
0
 def test_concatenate_output_with_log(self):
     out = LoadAndMerge(Filename='010444:010446',
                        OutputBehaviour='Concatenate',
                        SampleLogAsXAxis='sample.temperature')
     self.assertTrue(out)
     self.assertEqual(out.name(), 'out')
     self.assertTrue(isinstance(out, MatrixWorkspace))
     self.assertEqual(out.blocksize(), 3)
     self.assertAlmostEqual(out.readX(0)[0], 297.6, 1)
     self.assertAlmostEqual(out.readX(0)[1], 297.7, 1)
     self.assertAlmostEqual(out.readX(0)[2], 297.7, 1)
示例#11
0
 def test_single_run_load(self):
     out1 = LoadAndMerge(Filename='170257')
     self.assertTrue(out1)
     self.assertEqual(out1.name(), 'out1')
     self.assertTrue(isinstance(out1, MatrixWorkspace))
     mtd.clear()
示例#12
0
 def test_specific_loader(self):
     out5 = LoadAndMerge(Filename='170257',LoaderName='LoadILLIndirect',)
     self.assertTrue(out5)
     self.assertEquals(out5.name(), 'out5')
     self.assertTrue(isinstance(out5, MatrixWorkspace))
     mtd.clear()
示例#13
0
 def test_many_runs_summed(self):
     out2 = LoadAndMerge(Filename='170257+170258',LoaderName='LoadILLIndirect')
     self.assertTrue(out2)
     self.assertEquals(out2.name(), 'out2')
     self.assertTrue(isinstance(out2, MatrixWorkspace))
     mtd.clear()
示例#14
0
 def test_single_run_load(self):
     out1 = LoadAndMerge(Filename='170257')
     self.assertTrue(out1)
     self.assertEquals(out1.name(), 'out1')
     self.assertTrue(isinstance(out1, MatrixWorkspace))
     mtd.clear()