def test_default_options(self): red = PowderDiffILLReduction(Run=self._runs) self.assertTrue(red) self.assertTrue(not red.isDistribution()) self.assertTrue(not red.isHistogramData()) self.assertEquals(red.getNumberHistograms(), 2) self.assertEquals(red.blocksize(), 3008) xaxis = red.getAxis(0).extractValues() xunit = red.getAxis(0).getUnit().unitID() self.assertEquals(xunit, 'Degrees') self.assertAlmostEqual(xaxis[0], 0.4034, 4) self.assertAlmostEqual(xaxis[-1], 150.7534, 4) spectrumaxis = red.getAxis(1).extractValues() self.assertAlmostEqual(spectrumaxis[0], 253.924, 5) self.assertAlmostEqual(spectrumaxis[1], 242.82001, 5) self.assertEquals(red.readY(0)[0], 644) self.assertAlmostEqual(red.readE(0)[0], 25.3772, 4) self.assertEquals(red.readY(0)[3007], 8468) self.assertAlmostEqual(red.readE(0)[3007], 92.0217, 4) self.assertEquals(red.readY(1)[1], 1105) self.assertAlmostEqual(red.readE(1)[1], 33.2415, 4) self.assertEquals(red.readY(0)[1400], 9532) self.assertEquals(red.readY(1)[2100], 9789)
def test_default_options(self): red = PowderDiffILLReduction(Run=self._runs) self.assertTrue(red) self.assertTrue(not red.isDistribution()) self.assertTrue(not red.isHistogramData()) self.assertEquals(red.getNumberHistograms(),2) self.assertEquals(red.blocksize(),3008) xaxis = red.getAxis(0).extractValues() xunit = red.getAxis(0).getUnit().unitID() self.assertEquals(xunit,'Degrees') self.assertAlmostEqual(xaxis[0],0.4034,4) self.assertAlmostEqual(xaxis[-1],150.7534,4) spectrumaxis = red.getAxis(1).extractValues() self.assertAlmostEqual(spectrumaxis[0],253.924,5) self.assertAlmostEqual(spectrumaxis[1],242.82001,5) self.assertEquals(red.readY(0)[0],644) self.assertAlmostEqual(red.readE(0)[0],25.3772,4) self.assertEquals(red.readY(0)[3007], 8468) self.assertAlmostEqual(red.readE(0)[3007],92.0217,4) self.assertEquals(red.readY(1)[1],1105) self.assertAlmostEqual(red.readE(1)[1],33.2415,4) self.assertEquals(red.readY(0)[1400],9532) self.assertEquals(red.readY(1)[2100],9789)
def test_crop_zero_counting_cells(self): red = PowderDiffILLReduction(Run=self._runs, ZeroCountingCells='Crop') self.assertTrue(red) self.assertEquals(red.blocksize(), 3002)
def test_crop_zero_counting_cells(self): red = PowderDiffILLReduction(Run=self._runs,ZeroCountingCells='Crop') self.assertTrue(red) self.assertEquals(red.blocksize(), 3002)