Example #1
0
    def testextract_kratios(self):
        list_values = [(200e-9,), (250e-9,)]
        list_options = self.exp.create_unknown_options(list_values)

        intensities = create_intensity_dict(Ka(29), et=(4.0, 0.0))
        results1 = Results(list_options[0],
                           {'xray': PhotonIntensityResult(intensities)})

        intensities = create_intensity_dict(Ka(29), et=(8.0, 0.0))
        results2 = Results(list_options[1],
                           {'xray': PhotonIntensityResult(intensities)})

        intensities = self.exp.extract_unknown_intensities([results1, results2])

        self.assertEqual(2, len(intensities))
        self.assertAlmostEqual(4.0, intensities[0][0], 4)
        self.assertAlmostEqual(8.0, intensities[1][0], 4)
    def testextract_unknown_intensities(self):
        unkgeometry = Substrate(pure(49))
        options = self.m.create_unknown_options("meas", unkgeometry)

        intensities = create_intensity_dict(Ka(29), et=(4.0, 0.0))
        results = Results(options, {"xray": PhotonIntensityResult(intensities)})

        unkintensities = self.m.extract_unknown_intensities(results)

        self.assertEqual(1, len(unkintensities))
        self.assertAlmostEqual(4.0, unkintensities[0], 4)
Example #3
0
    def testextract_unknown_intensities(self):
        unkgeometry = Substrate(pure(49))
        options = self.m.create_unknown_options('meas', unkgeometry)

        intensities = create_intensity_dict(Ka(29), et=(4.0, 0.0))
        results = Results(options, {'xray': PhotonIntensityResult(intensities)})

        unkintensities = self.m.extract_unknown_intensities(results)

        self.assertEqual(1, len(unkintensities))
        self.assertAlmostEqual(4.0, unkintensities[0], 4)
Example #4
0
    def testextract_standard_intensities(self):
        list_options = self.exp.create_standard_options()
        stdoptions = list_options[0]

        intensities = create_intensity_dict(Ka(29), et=(8.0, 0.0))
        stdresults = Results(stdoptions,
                             {'xray': PhotonIntensityResult(intensities)})

        stdintensities = self.exp.extract_standard_intensities([stdresults])

        self.assertEqual(1, len(stdintensities))
        self.assertAlmostEqual(8.0, stdintensities[0], 4)
    def testextract_standard_intensities(self):
        list_options = self.m.create_standard_options("std")
        stdoptions = list_options[0]

        intensities = create_intensity_dict(Ka(29), et=(8.0, 0.0))
        results = {"xray": PhotonIntensityResult(intensities)}
        stdresults = Results(stdoptions, results)

        dict_results = {"std+Cu Ka": stdresults}
        stdintensities = self.m.extract_standard_intensities("std", dict_results)

        self.assertEqual(1, len(stdintensities))
        self.assertAlmostEqual(8.0, stdintensities[0], 4)
Example #6
0
    def testextract_standard_intensities(self):
        list_options = self.m.create_standard_options('std')
        stdoptions = list_options[0]

        intensities = create_intensity_dict(Ka(29), et=(8.0, 0.0))
        results = {'xray': PhotonIntensityResult(intensities)}
        stdresults = Results(stdoptions, results)

        dict_results = {'std+Cu Ka': stdresults}
        stdintensities = self.m.extract_standard_intensities('std', dict_results)

        self.assertEqual(1, len(stdintensities))
        self.assertAlmostEqual(8.0, stdintensities[0], 4)