Beispiel #1
0
 def test_tab_lis_read_custom(self):
     reader = RR(quantity="DoseRate")
     res = {"AlBa-1s": OrderedDict([(PQ.Isotope(75, 32, 0),
                                     StoredData(PQ.DoseRate(2.0663E+05, unc=0.99 * 2.0663E+05))),
                                    (PQ.Isotope(26, 13, 1),
                                     StoredData(PQ.DoseRate(2.2300E+10, unc=0.001845 * 2.2300E+10)))])}
     data = reader.load(join(_basedir, join(_basedir, "test_data/ResnucInputTest_tab.lis")))
     self.assertEqual(data, res)
Beispiel #2
0
 def test_add_multiple_elements_not_existing(self):
     res = {
         "det1":
         OrderedDict([(PQ.Isotope(3, 1, 0),
                       StoredData(PQ.Activity(10., 2.), PQ.AoverLE(10., 2.),
                                  PQ.DoseRate(20., 3.)))])
     }
     self.singleElementData["det1"][PQ.Isotope(3, 1, 0)].append(
         PQ.AoverLE(10., 2.), PQ.DoseRate(20., 3.))
     self.assertEqual(self.singleElementData, res)
Beispiel #3
0
 def test_add_multiple_elements_not_existing_as_list(self):
     self.assertRaises(
         ValueError, self.singleElementData["det1"][PQ.Isotope(3, 1,
                                                               0)].append,
         [PQ.AoverLE(10., 2.), PQ.DoseRate(20., 3.)])