Esempio n. 1
0
    def setUp(self):
        TestCase.setUp(self)

        self.t1 = Transition(29, 9, 4)

        distributions = {}
        enf = np.ones((5, 5, 5))
        distributions[PhotonKey(self.t1, True, PhotonKey.P)] = enf

        self.r = PhotonEmissionMapResult(distributions)
Esempio n. 2
0
class TestPhotonEmissionMapResult(TestCase):

    def setUp(self):
        TestCase.setUp(self)

        self.t1 = Transition(29, 9, 4)

        distributions = {}
        enf = np.ones((5, 5, 5))
        distributions[PhotonKey(self.t1, True, PhotonKey.P)] = enf

        self.r = PhotonEmissionMapResult(distributions)

    def testexists(self):
        self.assertTrue(self.r.exists(self.t1))
        self.assertTrue(self.r.exists('Cu La1'))
        self.assertFalse(self.r.exists('Cu Ka1'))

    def testget(self):
        m = self.r.get(self.t1, True, False)
        self.assertEqual(3, m.ndim)