def _execute_IndirectSampleChanger(self): IndirectSampleChanger(FirstRun=self._first_run, LastRun=self._last_run, NumberSamples=self._number_samples, Instrument=self._instrument, Analyser=self._analyser, Reflection=self._reflection, SpectraRange=self._spectra_range, ElasticRange=self._elastic_range, InelasticRange=self._inelastic_range, TotalRange=self._total_range, MSDFit=self._msd_fit, WidthFit=self._width_fit)
def test_sampleChanger(self): """ Basic test for sample changer """ IndirectSampleChanger(FirstRun=72462, LastRun=72465, NumberSamples=1, Instrument='IRIS', Analyser='graphite', Reflection='002', SpectraRange='3, 50', ElasticRange='-0.5, 0', InelasticRange='0, 0.5', GroupingMethod='All') scan_ws = mtd['iris72462_to_72465_s0_scan_eisf'] self.assertEqual(round(scan_ws.readY(0)[0], 7), 1.0519965) self.assertEqual(round(scan_ws.readY(1)[0], 7), 1.0452707)
def test_multiple_samples(self): """ Test for running with different material in the sample changer """ IndirectSampleChanger(FirstRun=72462, LastRun=72465, NumberSamples=2, Instrument='IRIS', Analyser='graphite', Reflection='002', SpectraRange='3, 50', ElasticRange='-0.5, 0', InelasticRange='0, 0.5', GroupingMethod='All') scan_ws = mtd['iris72462_to_72464_s0_scan_eisf'] self.assertEqual(round(scan_ws.readY(0)[0], 7), 1.0519965) self.assertEqual(round(scan_ws.readY(1)[0], 7), 1.0487223) scan_ws = mtd['iris72463_to_72465_s1_scan_eisf'] self.assertEqual(round(scan_ws.readY(0)[0], 7), 1.0452707) self.assertEqual(round(scan_ws.readY(1)[0], 7), 1.0537665)
def test_msdFit(self): """ Basic test for sample changer with MSDFit """ IndirectSampleChanger(FirstRun=72462, LastRun=72465, NumberSamples=1, Instrument='IRIS', Analyser='graphite', Reflection='002', SpectraRange='3, 50', ElasticRange='-0.5, 0', InelasticRange='0, 0.5', GroupingMethod='Individual', msdFit=True) scan_ws = mtd['iris72462_to_72465_s0_scan_eisf'] self.assertEqual(round(scan_ws.readY(0)[0], 7), 1.1014862) self.assertEqual(round(scan_ws.readY(1)[0], 7), 1.1648556) msd_ws = mtd['iris72462_to_72465_s0_scan_msd'] self.assertEqual(round(scan_ws.readY(0)[1], 7), 1.1355038) self.assertEqual(round(scan_ws.readY(1)[2], 7), 1.1431749)